diff --git a/bsp/mm32l3xx/Libraries/SConscript b/bsp/mm32l3xx/Libraries/SConscript index 91b6d144b3..14e95cd282 100644 --- a/bsp/mm32l3xx/Libraries/SConscript +++ b/bsp/mm32l3xx/Libraries/SConscript @@ -7,9 +7,7 @@ CPPPATH = [cwd + '/CMSIS/KEIL_CORE', cwd + '/MM32L3xx/Include', cwd + '/MM32L3x src += Glob('MM32L3xx/HAL_lib/src/*.c') CPPDEFINES = ['USE_STDPERIPH_DRIVER'] -if rtconfig.CROSS_TOOL == 'gcc': - src += ['MM32L3xx/Source/GCC_StartAsm/startup_MM32L3xx.s'] -elif rtconfig.CROSS_TOOL == 'keil': +if rtconfig.CROSS_TOOL == 'keil': src += ['MM32L3xx/Source/KEIL_StartAsm/startup_MM32L3xx.s'] elif rtconfig.CROSS_TOOL == 'iar': src += ['MM32L3xx/Source/IAR_StartAsm/startup_MM32L3xx.s'] diff --git a/bsp/mm32l3xx/rtconfig.py b/bsp/mm32l3xx/rtconfig.py index 241b1456fa..1e87cf72e0 100644 --- a/bsp/mm32l3xx/rtconfig.py +++ b/bsp/mm32l3xx/rtconfig.py @@ -42,7 +42,7 @@ if PLATFORM == 'gcc': OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' - DEVICE = ' -mcpu=' + CPU + ' -ffunction-sections -fdata-sections -Wall' + DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -Wall' CFLAGS = DEVICE + ' -std=c99' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T drivers/linker_scripts/link.lds'