Skip to content

Commit 90973e2

Browse files
committed
Add r4 minima to existing CMake builds
1 parent b5f7dce commit 90973e2

4 files changed

Lines changed: 81 additions & 1 deletion

File tree

.github/workflows/real-time-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
strategy:
177177
fail-fast: false
178178
matrix:
179-
suite: [ am335x, bcm2835_raspi_b, lpc11c24, nxp_imxrt1062, rpi_pico_rp2040, rpi_pico2_rp2350, stm32f100, stm32f407, stm32f429, stm32f446, stm32h7a3, stm32l100c, stm32l152, stm32l432 ]
179+
suite: [ am335x, bcm2835_raspi_b, lpc11c24, nxp_imxrt1062, r7fa4m1ab, rpi_pico_rp2040, rpi_pico2_rp2350, stm32f100, stm32f407, stm32f429, stm32f446, stm32h7a3, stm32l100c, stm32l152, stm32l432 ]
180180
steps:
181181
- uses: actions/checkout@v4
182182
with:

ref_app/cmake/r7fa4m1ab.cmake

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
##############################################################################
2+
# Copyright Christopher Kormanyos 2021 - 2026.
3+
# Distributed under the Boost Software License,
4+
# Version 1.0. (See accompanying file LICENSE_1_0.txt
5+
# or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
7+
#
8+
# MIT License
9+
#
10+
# Copyright (c) 2019 Joel Winarske
11+
#
12+
# Permission is hereby granted, free of charge, to any person obtaining a copy
13+
# of this software and associated documentation files (the "Software"), to deal
14+
# in the Software without restriction, including without limitation the rights
15+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16+
# copies of the Software, and to permit persons to whom the Software is
17+
# furnished to do so, subject to the following conditions:
18+
#
19+
# The above copyright notice and this permission notice shall be included in all
20+
# copies or substantial portions of the Software.
21+
#
22+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28+
# SOFTWARE.
29+
#
30+
31+
set(APP ref_app)
32+
33+
set(CMAKE_EXECUTABLE_SUFFIX .elf)
34+
35+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
36+
set(CMAKE_CXX_STANDARD 14)
37+
38+
set(TARGET_INCLUDES
39+
${PATH_APP}/util/STL
40+
)
41+
42+
set(_TARGET_CFLAGS
43+
-finline-functions
44+
-finline-limit=32
45+
-mcpu=cortex-m4
46+
-mtune=cortex-m4
47+
-mthumb
48+
-mfloat-abi=hard
49+
-mfpu=fpv4-sp-d16
50+
-ffast-math
51+
-mno-unaligned-access
52+
-mno-long-calls
53+
)
54+
55+
set(TARGET_AFLAGS "")
56+
57+
set(_TARGET_LDFLAGS
58+
-nostdlib
59+
-nostartfiles
60+
-T ${LINKER_DEFINITION_FILE}
61+
)
62+
63+
string(REPLACE ";" " " TARGET_CFLAGS "${_TARGET_CFLAGS}")
64+
string(REPLACE ";" " " TARGET_LDFLAGS "${_TARGET_LDFLAGS}")
65+
66+
67+
set(FILES_TARGET
68+
${PATH_APP}/mcal/mcal_gcc_cxx_completion
69+
${PATH_TGT}/startup/crt0
70+
${PATH_TGT}/startup/crt0_init_ram
71+
${PATH_TGT}/startup/crt1
72+
${PATH_TGT}/startup/int_vect
73+
)

ref_app/ref_app.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,6 +3486,10 @@
34863486
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
34873487
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
34883488
</None>
3489+
<None Include="cmake\r7fa4m1ab.cmake">
3490+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
3491+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
3492+
</None>
34893493
<None Include="cmake\riscvfe310.cmake">
34903494
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
34913495
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>

ref_app/ref_app.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,6 +3353,9 @@
33533353
<None Include="tools\Util\msys64\usr\local\llvm-17.0.2-riscv32\COPYING">
33543354
<Filter>tools\Util\msys64\usr\local\llvm-17.0.2-riscv32</Filter>
33553355
</None>
3356+
<None Include="cmake\r7fa4m1ab.cmake">
3357+
<Filter>src\cmake</Filter>
3358+
</None>
33563359
</ItemGroup>
33573360
<ItemGroup>
33583361
<Text Include="CMakeLists.txt" />

0 commit comments

Comments
 (0)