Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit182fdf4

Browse files
authored
Merge pull request#353 from fpistm/custom_startup
Allow use of a custom startup file
2 parents891d9fb +c3d12c6 commit182fdf4

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include"stm32_def_build.h"
22

3+
#if defined(CMSIS_STARTUP_FILE)
34
#include CMSIS_STARTUP_FILE
4-
5+
#endif

‎cores/arduino/stm32/stm32_def_build.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef_STM32_DEF_BUILD_
22
#define_STM32_DEF_BUILD_
33

4+
#if !defined(CMSIS_STARTUP_FILE)&& !defined(CUSTOM_STARTUP_FILE)
45
#if defined(STM32F030x6)
56
#defineCMSIS_STARTUP_FILE "startup_stm32f030x6.s"
67
#elif defined(STM32F030x8)
@@ -296,4 +297,7 @@
296297
#else
297298
#error UNKNOWN CHIP
298299
#endif
299-
#endif//_STM32_DEF_BUILD_
300+
#else
301+
#warning "No CMSIS startup file defined, custom one should be used"
302+
#endif/* !CMSIS_STARTUP_FILE && !CUSTOM_STARTUP_FILE */
303+
#endif/* _STM32_DEF_BUILD_ */

‎platform.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ compiler.c.extra_flags=
5959
compiler.c.elf.extra_flags=
6060
compiler.cpp.extra_flags=
6161
compiler.cpp.std=gnu++14
62-
compiler.S.extra_flags=
62+
compiler.S.extra_flags={build.startup_file}
6363
compiler.ar.extra_flags=
6464
compiler.elf2bin.extra_flags=
6565
compiler.elf2hex.extra_flags=
@@ -81,6 +81,7 @@ build.info.flags=-D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{bui
8181
# Defaults config
8282
build.xSerial=-DHAL_UART_MODULE_ENABLED
8383
build.enable_usb=
84+
build.startup_file=
8485
build.flags.optimize=-Os
8586
build.flags.ldspecs=--specs=nano.specs
8687

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp