Skip to content

Commit b34ee3c

Browse files
committed
Armed board variant
1 parent 6334089 commit b34ee3c

11 files changed

+2388
-0
lines changed

boards.txt

+68
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,35 @@ Maple.menu.upload_method.serialMethod=Serial
597597
Maple.menu.upload_method.serialMethod.upload.protocol=maple_serial
598598
Maple.menu.upload_method.serialMethod.upload.tool=serial_upload
599599

600+
################################################################################
601+
# Armed boards
602+
Armed.name=Armed Series
603+
604+
Armed.build.vid=0x0483
605+
Armed.build.pid=0x5740
606+
Armed.vid.0=0x0483
607+
Armed.pid.0=0x5740
608+
609+
Armed.build.core=arduino
610+
Armed.build.board=Armed
611+
Armed.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -g -ggdb
612+
613+
# Armed V1 board
614+
Armed.menu.pnum.Armed_V1=Armed V1 board
615+
Armed.menu.pnum.Armed_V1.upload.maximum_size=1048576
616+
Armed.menu.pnum.Armed_V1.upload.maximum_data_size=196608
617+
Armed.menu.pnum.Armed_V1.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
618+
Armed.menu.pnum.Armed_V1.build.board=Armed_V1
619+
Armed.menu.pnum.Armed_V1.build.series=STM32F4xx
620+
Armed.menu.pnum.Armed_V1.build.product_line=STM32F407xx
621+
Armed.menu.pnum.Armed_V1.build.variant=Armed_V1
622+
Armed.menu.pnum.Armed_V1.build.cmsis_lib_gcc=arm_cortexM4l_math
623+
624+
# Upload menu
625+
Armed.menu.upload_method.STLink=STLink
626+
Armed.menu.upload_method.STLink.upload.protocol=STLink
627+
Armed.menu.upload_method.STLink.upload.tool=stlink_upload
628+
600629
################################################################################
601630
# RAK boards
602631

@@ -723,6 +752,12 @@ Maple.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
723752
Maple.menu.xserial.disabled=Disabled (No Serial)
724753
Maple.menu.xserial.disabled.build.xSerial=
725754

755+
Armed.menu.xserial.generic=Enabled with generic Serial
756+
Armed.menu.xserial.none=Enabled without generic Serial
757+
Armed.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
758+
Armed.menu.xserial.disabled=Disabled (No Serial)
759+
Armed.menu.xserial.disabled.build.xSerial=
760+
726761
RAK.menu.xserial.generic=Enabled with generic Serial
727762
RAK.menu.xserial.none=Enabled without generic Serial
728763
RAK.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
@@ -760,6 +795,10 @@ Disco.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE
760795
#Disco.menu.usb.CDC=CDC (if available)
761796
#Disco.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DUSE_USB_FS
762797

798+
#Armed.menu.usb.enable_USB=None
799+
#Armed.menu.usb.CDC=CDC (if available)
800+
#Armed.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DUSE_USB_FS
801+
763802
# Optimizations
764803
Nucleo_144.menu.opt.osstd=Smallest (-Os default)
765804
Nucleo_144.menu.opt.oslto=Smallest (-Os) with LTO
@@ -888,6 +927,25 @@ Maple.menu.opt.o3lto.build.flags.optimize=-O3 -flto
888927
Maple.menu.opt.ogstd=Debug (-g)
889928
Maple.menu.opt.ogstd.build.flags.optimize=-g -Og
890929

930+
Armed.menu.opt.osstd=Smallest (-Os default)
931+
Armed.menu.opt.osstd.build.flags.optimize=-Os
932+
Armed.menu.opt.oslto=Smallest (-Os) with LTO
933+
Armed.menu.opt.oslto.build.flags.optimize=-Os -flto
934+
Armed.menu.opt.o1std=Fast (-O1)
935+
Armed.menu.opt.o1std.build.flags.optimize=-O1
936+
Armed.menu.opt.o1lto=Fast (-O1) with LTO
937+
Armed.menu.opt.o1lto.build.flags.optimize=-O1 -flto
938+
Armed.menu.opt.o2std=Faster (-O2)
939+
Armed.menu.opt.o2std.build.flags.optimize=-O2
940+
Armed.menu.opt.o2lto=Faster (-O2) with LTO
941+
Armed.menu.opt.o2lto.build.flags.optimize=-O2 -flto
942+
Armed.menu.opt.o3std=Fastest (-O3)
943+
Armed.menu.opt.o3std.build.flags.optimize=-O3
944+
Armed.menu.opt.o3lto=Fastest (-O3) with LTO
945+
Armed.menu.opt.o3lto.build.flags.optimize=-O3 -flto
946+
Armed.menu.opt.ogstd=Debug (-g)
947+
Armed.menu.opt.ogstd.build.flags.optimize=-g -Og
948+
891949
RAK.menu.opt.osstd=Smallest (-Os default)
892950
RAK.menu.opt.oslto=Smallest (-Os) with LTO
893951
RAK.menu.opt.oslto.build.flags.optimize=-Os -flto
@@ -995,6 +1053,16 @@ Maple.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float
9951053
Maple.menu.rtlib.full=Newlib Standard
9961054
Maple.menu.rtlib.full.build.flags.ldspecs=
9971055

1056+
Armed.menu.rtlib.nano=Newlib Nano (default)
1057+
Armed.menu.rtlib.nanofp=Newlib Nano + Float Printf
1058+
Armed.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float
1059+
Armed.menu.rtlib.nanofs=Newlib Nano + Float Scanf
1060+
Armed.menu.rtlib.nanofs.build.flags.ldspecs=--specs=nano.specs -u _scanf_float
1061+
Armed.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf
1062+
Armed.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float
1063+
Armed.menu.rtlib.full=Newlib Standard
1064+
Armed.menu.rtlib.full.build.flags.ldspecs=
1065+
9981066
RAK.menu.rtlib.nano=Newlib Nano (default)
9991067
RAK.menu.rtlib.nanofp=Newlib Nano + Float Printf
10001068
RAK.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float

variants/ARMED_V1/PeripheralPins.c

+324
Large diffs are not rendered by default.

variants/ARMED_V1/PinNamesVar.h

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SYS_WKUP */
2+
#ifdef PWR_WAKEUP_PIN1
3+
SYS_WKUP1 = PA_0,
4+
#endif
5+
#ifdef PWR_WAKEUP_PIN2
6+
SYS_WKUP2 = NC,
7+
#endif
8+
#ifdef PWR_WAKEUP_PIN3
9+
SYS_WKUP3 = NC,
10+
#endif
11+
#ifdef PWR_WAKEUP_PIN4
12+
SYS_WKUP4 = NC,
13+
#endif
14+
#ifdef PWR_WAKEUP_PIN5
15+
SYS_WKUP5 = NC,
16+
#endif
17+
#ifdef PWR_WAKEUP_PIN6
18+
SYS_WKUP6 = NC,
19+
#endif
20+
#ifdef PWR_WAKEUP_PIN7
21+
SYS_WKUP7 = NC,
22+
#endif
23+
#ifdef PWR_WAKEUP_PIN8
24+
SYS_WKUP8 = NC,
25+
#endif

variants/ARMED_V1/ldscript.ld

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/*
2+
*****************************************************************************
3+
**
4+
5+
** File : LinkerScript.ld
6+
**
7+
** Abstract : Linker script for STM32F407VETx Device with
8+
** 512KByte FLASH, 128KByte RAM
9+
**
10+
** Set heap size, stack size and stack location according
11+
** to application requirements.
12+
**
13+
** Set memory bank area and size if external memory is used.
14+
**
15+
** Target : STMicroelectronics STM32
16+
**
17+
**
18+
** Distribution: The file is distributed as is, without any warranty
19+
** of any kind.
20+
**
21+
** (c)Copyright Ac6.
22+
** You may use this file as-is or modify it according to the needs of your
23+
** project. Distribution of this file (unmodified or modified) is not
24+
** permitted. Ac6 permit registered System Workbench for MCU users the
25+
** rights to distribute the assembled, compiled & linked contents of this
26+
** file as part of an application binary file, provided that it is built
27+
** using the System Workbench for MCU toolchain.
28+
**
29+
*****************************************************************************
30+
*/
31+
32+
/* Entry Point */
33+
ENTRY(Reset_Handler)
34+
35+
/* Highest address of the user mode stack */
36+
_estack = 0x20020000; /* end of RAM */
37+
/* Generate a link error if heap and stack don't fit into RAM */
38+
_Min_Heap_Size = 0x200;; /* required amount of heap */
39+
_Min_Stack_Size = 0x400;; /* required amount of stack */
40+
41+
/* Specify the memory areas */
42+
MEMORY
43+
{
44+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
45+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
46+
}
47+
48+
/* Define output sections */
49+
SECTIONS
50+
{
51+
/* The startup code goes first into FLASH */
52+
.isr_vector :
53+
{
54+
. = ALIGN(4);
55+
KEEP(*(.isr_vector)) /* Startup code */
56+
. = ALIGN(4);
57+
} >FLASH
58+
59+
/* The program code and other data goes into FLASH */
60+
.text ALIGN(4):
61+
{
62+
. = ALIGN(4);
63+
*(.text) /* .text sections (code) */
64+
*(.text*) /* .text* sections (code) */
65+
*(.glue_7) /* glue arm to thumb code */
66+
*(.glue_7t) /* glue thumb to arm code */
67+
*(.eh_frame)
68+
69+
KEEP (*(.init))
70+
KEEP (*(.fini))
71+
72+
. = ALIGN(4);
73+
_etext = .; /* define a global symbols at end of code */
74+
} >FLASH
75+
76+
/* Constant data goes into FLASH */
77+
.rodata ALIGN(4):
78+
{
79+
. = ALIGN(4);
80+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
81+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
82+
. = ALIGN(4);
83+
} >FLASH
84+
85+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
86+
.ARM : {
87+
__exidx_start = .;
88+
*(.ARM.exidx*)
89+
__exidx_end = .;
90+
} >FLASH
91+
92+
.preinit_array :
93+
{
94+
PROVIDE_HIDDEN (__preinit_array_start = .);
95+
KEEP (*(.preinit_array*))
96+
PROVIDE_HIDDEN (__preinit_array_end = .);
97+
} >FLASH
98+
.init_array :
99+
{
100+
PROVIDE_HIDDEN (__init_array_start = .);
101+
KEEP (*(SORT(.init_array.*)))
102+
KEEP (*(.init_array*))
103+
PROVIDE_HIDDEN (__init_array_end = .);
104+
} >FLASH
105+
.fini_array :
106+
{
107+
PROVIDE_HIDDEN (__fini_array_start = .);
108+
KEEP (*(SORT(.fini_array.*)))
109+
KEEP (*(.fini_array*))
110+
PROVIDE_HIDDEN (__fini_array_end = .);
111+
} >FLASH
112+
113+
/* used by the startup to initialize data */
114+
_sidata = LOADADDR(.data);
115+
116+
/* Initialized data sections goes into RAM, load LMA copy after code */
117+
.data :
118+
{
119+
. = ALIGN(4);
120+
_sdata = .; /* create a global symbol at data start */
121+
*(.data) /* .data sections */
122+
*(.data*) /* .data* sections */
123+
124+
. = ALIGN(4);
125+
_edata = .; /* define a global symbol at data end */
126+
} >RAM AT> FLASH
127+
128+
/*_siccmram = LOADADDR(.ccmram);*/
129+
130+
/* Uninitialized data section */
131+
. = ALIGN(4);
132+
.bss :
133+
{
134+
/* This is used by the startup in order to initialize the .bss secion */
135+
_sbss = .; /* define a global symbol at bss start */
136+
__bss_start__ = _sbss;
137+
*(.bss)
138+
*(.bss*)
139+
*(COMMON)
140+
141+
. = ALIGN(4);
142+
_ebss = .; /* define a global symbol at bss end */
143+
__bss_end__ = _ebss;
144+
} >RAM
145+
146+
/* User_heap_stack section, used to check that there is enough RAM left */
147+
._user_heap_stack :
148+
{
149+
. = ALIGN(4);
150+
PROVIDE ( end = . );
151+
PROVIDE ( _end = . );
152+
. = . + _Min_Heap_Size;
153+
. = . + _Min_Stack_Size;
154+
. = ALIGN(4);
155+
} >RAM
156+
157+
158+
159+
/* Remove information from the standard libraries */
160+
/DISCARD/ :
161+
{
162+
libc.a ( * )
163+
libm.a ( * )
164+
libgcc.a ( * )
165+
}
166+
167+
.ARM.attributes 0 : { *(.ARM.attributes) }
168+
}
169+
170+

0 commit comments

Comments
 (0)