Skip to content

Commit 8465e40

Browse files
committed
Merge pull request #280 from ralfak/patch-2
Update rtconfig.py
2 parents 64516d6 + 1f5e80a commit 8465e40

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bsp/stm32f40x/rtconfig.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
OBJDUMP = PREFIX + 'objdump'
4141
OBJCPY = PREFIX + 'objcopy'
4242

43-
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections'
44-
CFLAGS = DEVICE
43+
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
44+
CFLAGS = DEVICE + ' -g -Wall -DSTM32F407ZG -DSTM32F4XX -DUSE_STDPERIPH_DRIVER -D__ASSEMBLY__ -D__FPU_USED'
4545
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
46-
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
46+
LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
4747

4848
CPATH = ''
4949
LPATH = ''
@@ -64,8 +64,8 @@
6464
LINK = 'armlink'
6565
TARGET_EXT = 'axf'
6666

67-
DEVICE = ' --device DARMSTM'
68-
CFLAGS = DEVICE + ' --apcs=interwork'
67+
DEVICE = ' --cortex-m4.fp'
68+
CFLAGS = DEVICE + ' --apcs=interwork -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx'
6969
AFLAGS = DEVICE
7070
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct'
7171

0 commit comments

Comments
 (0)