Skip to content

Commit 44478cc

Browse files
authored
Merge pull request #194 from Rbb666/performance
Optimization: Use the ITCM segment to accelerate the operation of the FMT core algorithm.
2 parents 6475f84 + 9ace68c commit 44478cc

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/fmt_def.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#include "rtdef.h"
2121

22+
#ifndef __cplusplus
23+
#include <stdbool.h>
24+
#endif
25+
2226
#ifdef __cplusplus
2327
extern "C" {
2428
#endif
@@ -38,14 +42,12 @@ extern "C" {
3842

3943
#if !defined(bool) && !defined(__cplusplus)
4044
typedef int bool;
41-
#endif
42-
4345
#ifndef true
44-
#define true (1U)
46+
#define true (1U)
4547
#endif
46-
4748
#ifndef false
48-
#define false (0U)
49+
#define false (0U)
50+
#endif
4951
#endif
5052

5153
// Macro to define packed structures
@@ -124,4 +126,4 @@ typedef struct {
124126
}
125127
#endif
126128

127-
#endif
129+
#endif

target/infineon/edge-e83/m55/board/linker_scripts/link.ld

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ SECTIONS
153153
*(.dtors)
154154
/* Read only code (constants) */
155155
*(.rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
156-
/* Exclude certain files from this section as they will be placed in RAM */
157-
*(EXCLUDE_FILE(*cy_syslib.* *cy_syslib_ext.* *cy_smif.* *cy_smif_memnum.* *cy_smif_memslot.* *cy_smif_sfdp.* *cy_smif_hb_flash.* *mtb_hal_memoryspi.* *mtb_serial_memory.* *freertos/Source*.* *cy_clib_support*.* *cy_mutex_pool*.* *cy_time.* *cyabs_*.* *cy_worker_thread.* *cmsis*.*) .text*)
156+
/* Exclude hot vehicle-path objects from XIP so they can execute from ITCM */
157+
*(EXCLUDE_FILE(*cy_syslib.* *cy_syslib_ext.* *cy_smif.* *cy_smif_memnum.* *cy_smif_memslot.* *cy_smif_sfdp.* *cy_smif_hb_flash.* *mtb_hal_memoryspi.* *mtb_serial_memory.* *freertos/Source*.* *cy_clib_support*.* *cy_mutex_pool*.* *cy_time.* *cyabs_*.* *cy_worker_thread.* *cmsis*.* *ins_interface.* *INS.* *fms_interface.* *FMS.* *control_interface.* *Controller.* *task_vehicle.*) .text*)
158158

159159
. = ALIGN(4);
160160
/* section information for utest */
@@ -298,6 +298,13 @@ SECTIONS
298298
KEEP(*(.cy_itcm))
299299
KEEP(*(.cy_sram_code))
300300
KEEP(*(.cy_ramfunc))
301+
*task_vehicle.*(.text*)
302+
*ins_interface.*(.text*)
303+
*INS.*(.text*)
304+
*fms_interface.*(.text*)
305+
*FMS.*(.text*)
306+
*control_interface.*(.text*)
307+
*Controller.*(.text*)
301308
KEEP(*(.text.cy_os_common))
302309
*cy_syslib_ext.*(.text*)
303310
*cy_syslib.*(.text*)

0 commit comments

Comments
 (0)