cancel
Showing results for 
Search instead for 
Did you mean: 

On STM32F103 run procedures from RAM linker generate veneers procedure with wron code.

JBrow.8
Associate

STM32F103 have only trumb mode but linker generate veneers procedure in arm mode

and program go to HardFault.

How correct this problem.

example:

20004420 <__display_screen_set_display_function__veneer>:

20004420:   e51ff004   ldr   pc, [pc, #-4]   ; 20004424 <__display_data_get_temp_veneer>

20004424:   080002f8   .word   0x080002f8

in debuger show as folow:

20004420: 0x04f01fe5          ; <UNDEFINED> instruction: 0xf004e51f

20004424: 0x0000f802  lsls   r0, r7, #11

20004426: 0x00000008  lsrs   r0, r0, #32 => jmp 0x080002F8

2 REPLIES 2
KnarfB
Principal III

What compiler toolchain did you use and what compiler (command line) options?

JBrow.8
Associate

Arm-none-eabi-gcc (GNU Tools for STM32 7-2018-q2-update.20190328-1800) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

options

-mcpu=cortex-m3 --specs=nosys.specs -Wl,-Map="${ProjName}.map" -Wl,--cref -Wl,--gc-sections -nostartfiles -nodefaultlibs -nostdlib -static -L"..\ldscripts" -T mem_overlay.ld -T sections_overlay.ld -T libs.ld --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

STM32CubeIDE Version: 1.4.0