Skip to content

Commit a5c54b5

Browse files
added OpenIMU335 example
1 parent 685997c commit a5c54b5

24 files changed

Lines changed: 4149 additions & 1 deletion

boards/OpenIMU335.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"build": {
3+
"core": "stm32",
4+
"cpu": "cortex-m4",
5+
"extra_flags": [
6+
"-mcpu=cortex-m4",
7+
"-mfloat-abi=softfp",
8+
"-mfpu=fpv4-sp-d16",
9+
"-DSTM32F4",
10+
"-DSTM32F405RG",
11+
"-DSTM32F405xx"
12+
],
13+
"ldscript": "stm32f40x.ld",
14+
"f_cpu": "120000000L",
15+
"mcu": "stm32f405rg"
16+
},
17+
"debug": {
18+
"default_tools": ["stlink"],
19+
"openocd_target": "stm32f4x",
20+
"jlink_device": "STM32F405RG",
21+
"svd_path": "STM32F40x.svd"
22+
},
23+
"frameworks": [],
24+
"name": "Aceinna MTLT335",
25+
"upload": {
26+
"offset_address": "0x08010000",
27+
"maximum_ram_size": 131072,
28+
"maximum_size": 1048576,
29+
"protocols": [
30+
"blackmagic",
31+
"stlink",
32+
"jlink"
33+
],
34+
"protocol": "stlink"
35+
},
36+
"url": "https://www.aceinna.com/inertial-systems/",
37+
"vendor": "Aceinna"
38+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.pio/**
2+
.pio/libdeps/**
3+
.vscode/**
4+
.pioenvs/**
5+
.piolibdeps/**
6+
*.map
7+
.settings
8+
.cproject
9+
.project
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Continuous Integration (CI) is the practice, in software
2+
# engineering, of merging all developer working copies with a shared mainline
3+
# several times a day < http://docs.platformio.org/page/ci/index.html >
4+
#
5+
# Documentation:
6+
#
7+
# * Travis CI Embedded Builds with PlatformIO
8+
# < https://docs.travis-ci.com/user/integration/platformio/ >
9+
#
10+
# * PlatformIO integration with Travis CI
11+
# < http://docs.platformio.org/page/ci/travis.html >
12+
#
13+
# * User Guide for `platformio ci` command
14+
# < http://docs.platformio.org/page/userguide/cmd_ci.html >
15+
#
16+
#
17+
# Please choice one of the following templates (proposed below) and uncomment
18+
# it (remove "# " before each line) or use own configuration according to the
19+
# Travis CI documentation (see above).
20+
#
21+
22+
23+
#
24+
# Template #1: General project. Test it using existing `platformio.ini`.
25+
#
26+
27+
# language: python
28+
# python:
29+
# - "2.7"
30+
#
31+
# install:
32+
# - pip install -U platformio
33+
#
34+
# script:
35+
# - platformio run
36+
37+
38+
#
39+
# Template #2: The project is intended to by used as a library with examples
40+
#
41+
42+
# language: python
43+
# python:
44+
# - "2.7"
45+
#
46+
# env:
47+
# - PLATFORMIO_CI_SRC=path/to/test/file.c
48+
# - PLATFORMIO_CI_SRC=examples/file.ino
49+
# - PLATFORMIO_CI_SRC=path/to/test/directory
50+
#
51+
# install:
52+
# - pip install -U platformio
53+
#
54+
# script:
55+
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"build": {
3+
"core": "stm32",
4+
"cpu": "cortex-m4",
5+
"extra_flags": [
6+
"-mcpu=cortex-m4",
7+
"-mfloat-abi=softfp",
8+
"-mfpu=fpv4-sp-d16",
9+
"-DSTM32F4",
10+
"-DSTM32F405RG",
11+
"-DSTM32F405xx"
12+
],
13+
"ldscript": "stm32f40x.ld",
14+
"f_cpu": "120000000L",
15+
"mcu": "stm32f405rg"
16+
},
17+
"debug": {
18+
"default_tools": ["stlink"],
19+
"openocd_target": "stm32f4x",
20+
"jlink_device": "STM32F405RG",
21+
"svd_path": "STM32F40x.svd"
22+
},
23+
"frameworks": [],
24+
"name": "Aceinna MTLT335",
25+
"upload": {
26+
"offset_address": "0x08010000",
27+
"maximum_ram_size": 131072,
28+
"maximum_size": 1048576,
29+
"protocols": [
30+
"blackmagic",
31+
"stlink",
32+
"jlink"
33+
],
34+
"protocol": "stlink"
35+
},
36+
"url": "https://www.aceinna.com/inertial-systems/",
37+
"vendor": "Aceinna"
38+
}
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/*
2+
*****************************************************************************
3+
**
4+
5+
** File : LinkerScript.ld
6+
**
7+
** Abstract : Linker script for STM32F405RGx Device with
8+
** 1024KByte 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+
*****************************************************************************
22+
** @attention
23+
**
24+
** <h2><center>&copy; COPYRIGHT(c) 2014 Ac6</center></h2>
25+
**
26+
** Redistribution and use in source and binary forms, with or without modification,
27+
** are permitted provided that the following conditions are met:
28+
** 1. Redistributions of source code must retain the above copyright notice,
29+
** this list of conditions and the following disclaimer.
30+
** 2. Redistributions in binary form must reproduce the above copyright notice,
31+
** this list of conditions and the following disclaimer in the documentation
32+
** and/or other materials provided with the distribution.
33+
** 3. Neither the name of Ac6 nor the names of its contributors
34+
** may be used to endorse or promote products derived from this software
35+
** without specific prior written permission.
36+
**
37+
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38+
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39+
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40+
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
41+
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42+
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43+
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
44+
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45+
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
46+
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47+
**
48+
*****************************************************************************
49+
*/
50+
51+
/* Entry Point */
52+
ENTRY(Reset_Handler)
53+
54+
/* Highest address of the user mode stack */
55+
_estack = 0x2001ff00; /* end of RAM */
56+
/* Generate a link error if heap and stack don't fit into RAM */
57+
_Min_Heap_Size = 0x2000; /* required amount of heap */
58+
_Min_Stack_Size = 0x2000; /* required amount of stack */
59+
60+
/* Specify the memory areas */
61+
MEMORY
62+
{
63+
FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 448K
64+
EEPROM (rw) : ORIGIN = 0x08008000, LENGTH = 16K
65+
USER_EEPROM(rw) : ORIGIN = 0x0800C000, LENGTH = 16K
66+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
67+
}
68+
69+
/* Define output sections */
70+
SECTIONS
71+
{
72+
/* The startup code goes first into FLASH */
73+
.isr_vector :
74+
{
75+
. = ALIGN(4);
76+
KEEP(*(.isr_vector)) /* Startup code */
77+
. = ALIGN(4);
78+
} >FLASH
79+
80+
/* The program code and other data goes into FLASH */
81+
.text :
82+
{
83+
. = ALIGN(4);
84+
*(.text) /* .text sections (code) */
85+
*(.text*) /* .text* sections (code) */
86+
*(.glue_7) /* glue arm to thumb code */
87+
*(.glue_7t) /* glue thumb to arm code */
88+
*(.eh_frame)
89+
90+
KEEP (*(.init))
91+
KEEP (*(.fini))
92+
93+
. = ALIGN(4);
94+
_etext = .; /* define a global symbols at end of code */
95+
} >FLASH
96+
97+
/* Constant data goes into FLASH */
98+
.rodata :
99+
{
100+
. = ALIGN(4);
101+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
102+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
103+
. = ALIGN(4);
104+
} >FLASH
105+
106+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
107+
.ARM : {
108+
__exidx_start = .;
109+
*(.ARM.exidx*)
110+
__exidx_end = .;
111+
} >FLASH
112+
113+
.preinit_array :
114+
{
115+
PROVIDE_HIDDEN (__preinit_array_start = .);
116+
KEEP (*(.preinit_array*))
117+
PROVIDE_HIDDEN (__preinit_array_end = .);
118+
} >FLASH
119+
.init_array :
120+
{
121+
PROVIDE_HIDDEN (__init_array_start = .);
122+
KEEP (*(SORT(.init_array.*)))
123+
KEEP (*(.init_array*))
124+
PROVIDE_HIDDEN (__init_array_end = .);
125+
} >FLASH
126+
.fini_array :
127+
{
128+
PROVIDE_HIDDEN (__fini_array_start = .);
129+
KEEP (*(SORT(.fini_array.*)))
130+
KEEP (*(.fini_array*))
131+
PROVIDE_HIDDEN (__fini_array_end = .);
132+
} >FLASH
133+
134+
/* used by the startup to initialize data */
135+
_sidata = LOADADDR(.data);
136+
137+
/* Initialized data sections goes into RAM, load LMA copy after code */
138+
.data :
139+
{
140+
. = ALIGN(4);
141+
_sdata = .; /* create a global symbol at data start */
142+
*(.data) /* .data sections */
143+
*(.data*) /* .data* sections */
144+
145+
. = ALIGN(4);
146+
_edata = .; /* define a global symbol at data end */
147+
} >RAM AT> FLASH
148+
149+
150+
/* Uninitialized data section */
151+
. = ALIGN(4);
152+
.bss :
153+
{
154+
/* This is used by the startup in order to initialize the .bss secion */
155+
_sbss = .; /* define a global symbol at bss start */
156+
__bss_start__ = _sbss;
157+
*(.bss)
158+
*(.bss*)
159+
*(COMMON)
160+
161+
. = ALIGN(4);
162+
_ebss = .; /* define a global symbol at bss end */
163+
__bss_end__ = _ebss;
164+
} >RAM
165+
166+
/* User_heap_stack section, used to check that there is enough RAM left */
167+
._user_heap_stack :
168+
{
169+
. = ALIGN(8);
170+
PROVIDE ( end = . );
171+
PROVIDE ( _end = . );
172+
. = . + _Min_Heap_Size;
173+
. = . + _Min_Stack_Size;
174+
. = ALIGN(8);
175+
} >RAM
176+
177+
.eeprom 0x08008000:
178+
{
179+
. = ALIGN(4);
180+
KEEP(*(.xbowEeprom)) /* keep my variable even if not referenced */
181+
. = ALIGN(4);
182+
_eeeprom = .; /* define a global symbols at end of code */
183+
} >EEPROM
184+
185+
.usereeprom 0x0800C000:
186+
{
187+
. = ALIGN(4);
188+
KEEP(*(.userEeprom)) /* keep my variable even if not referenced */
189+
. = ALIGN(4);
190+
_eusereeprom = .; /* define a global symbols at end of code */
191+
} >USER_EEPROM
192+
193+
/* Remove information from the standard libraries */
194+
/DISCARD/ :
195+
{
196+
libc.a ( * )
197+
libm.a ( * )
198+
libgcc.a ( * )
199+
}
200+
201+
.ARM.attributes 0 : { *(.ARM.attributes) }
202+
}

0 commit comments

Comments
 (0)