Skip to content

Commit

Permalink
[STM32l432] fpu+cleanup. WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaël BRIDAY committed May 27, 2024
1 parent 34b178c commit 91d8327
Show file tree
Hide file tree
Showing 38 changed files with 209 additions and 392,845 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ build
*_exe
*.bin
*.map
*.py
build.py
make.py
CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ build
*_exe
*.bin
*.map
*.py
build.py
make.py
CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CPU blink {
ASSEMBLER = "arm-none-eabi-as";
LINKER = "arm-none-eabi-ld";
COPIER = "arm-none-eabi-objcopy";
SYSTEM = PYTHON;
SYSTEM = CMAKE {VSCODE=TRUE;};
};
SYSTEM_CALL = TRUE;
MEMMAP = TRUE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CPU serial {
ASSEMBLER = "arm-none-eabi-as";
LINKER = "arm-none-eabi-ld";
COPIER = "arm-none-eabi-objcopy";
SYSTEM = PYTHON;
SYSTEM = CMAKE {VSCODE=TRUE;};
};
SYSTEM_CALL = TRUE;
MEMMAP = TRUE {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
%
template if exists tpl_library_defines
%
/*-----------------------------------------------------------------------------
* Use FLOAT truc instructions
*/%
let use_float := false
foreach isr in ISRS do
if isr::USEFLOAT then
let use_float := true
end if
end foreach

foreach task in TASKS do
if task::USEFLOAT then
let use_float := true
end if
end foreach
%
#define WITH_FLOAT % !yesNo(use_float) %
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%
if exists proc::STACKSIZE then

let use_float := false
foreach sisr in ISRS do
if sisr::USEFLOAT then
let use_float := true
end if
end foreach
foreach tsk in TASKS do
if tsk::USEFLOAT then
let use_float := true
end if
end foreach

%/*
* % !proc::KIND % % !proc::NAME % stack
*/
#define APP_% !proc::KIND %_% !proc::NAME %_START_SEC_STACK
#include "tpl_memmap.h"
VAR(tpl_stack_word, OS_APPL_DATA) % !proc::NAME %_stack_zone[% !proc::STACKSIZE %/sizeof(tpl_stack_word)];
#define APP_% !proc::KIND %_% !proc::NAME %_STOP_SEC_STACK
#include "tpl_memmap.h"

#define % !proc::NAME %_STACK {% !proc::NAME %_stack_zone, % !proc::STACKSIZE %}

/*
* % !proc::KIND % % !proc::NAME % context
*/
#define OS_START_SEC_VAR_NOINIT_32BIT
#include "tpl_memmap.h"
VAR(arm_core_context, OS_VAR) % !proc::NAME %_int_context;%
if use_float then
if exists proc::USEFLOAT default(false) then %
VAR(arm_float_context, OS_VAR) % !proc::NAME %_fp_context;
#define % !proc::NAME %_CONTEXT { &% !proc::NAME %_int_context, &% !proc::NAME %_fp_context }%
else %
#define % !proc::NAME %_CONTEXT { &% !proc::NAME %_int_context, NULL }%
end if
else %
#define % !proc::NAME %_CONTEXT &% !proc::NAME %_int_context%
end if %
#define OS_STOP_SEC_VAR_NOINIT_32BIT
#include "tpl_memmap.h"
%end if #proc::STACKSIZE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Specify the memory areas for stm32f303 */
/* Specify the memory areas for stm32l432 */
MEMORY
{
VECTOR (rx) : ORIGIN = 0x08000000, LENGTH = 0x168
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ENTRY(tpl_reset_handler)

/* Highest address of the user mode stack */
_estack = 0x20010000; /* end of 64K RAM on AHB bus*/
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of 64K RAM on AHB bus*/

/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0; /* required amount of heap */
Expand Down
Loading

0 comments on commit 91d8327

Please sign in to comment.