Debian Codegraph @

tests/site_scons/platforms/stm32/stm32.py

raw
1 # Compiler settings for running the tests on a STM32 discovery board
2 # Tested on the STM32F7 Discovery, but should work on pretty much
3 # any STM32 with >= 128kB of RAM. To avoid wearing out the flash,
4 # code is run from RAM also.
5
6 def set_stm32_platform(env):
7 env.Replace(EMBEDDED = "STM32")
8 env.Replace(CC = "arm-none-eabi-gcc",
9 CXX = "arm-none-eabi-g++")
10 env.Replace(TEST_RUNNER = "site_scons/platforms/stm32/run_test.sh")
11 env.Append(CPPDEFINES = {'FUZZTEST_BUFSIZE': 4096})
12 env.Append(CFLAGS = "-mcpu=cortex-m3 -mthumb -Os")
13 env.Append(CXXFLAGS = "-mcpu=cortex-m3 -mthumb -Os")
14 env.Append(LINKFLAGS = "-mcpu=cortex-m3 -mthumb")
15 env.Append(LINKFLAGS = "site_scons/platforms/stm32/vectors.c")
16 env.Append(LINKFLAGS = "--specs=rdimon.specs")
17 env.Append(LINKFLAGS = "-Tsite_scons/platforms/stm32/stm32_ram.ld")
18