Skip to content

Commit

Permalink
[bsp][fm33lc026][rsoc] Fix compilation issues with bsp of fm33lc026
Browse files Browse the repository at this point in the history
  • Loading branch information
hydevcode committed Sep 28, 2024
1 parent 5562779 commit 1950825
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bsp_buildings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ jobs:
- "microchip/same70"
- "smartfusion2"
- "maxim/max32660-evsys"
- RTT_BSP: "fm33lc026"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "fm33lc026"
- RTT_BSP: "mips"
RTT_TOOL_CHAIN: "sourcery-mips"
SUB_RTT_BSP:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
#- {RTT_BSP_NAME: "essemi_es32f365x", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "essemi/es32f365x"} #GCC link文件没支持好
- {RTT_BSP_NAME: "essemi_es32f369x", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "essemi/es32f369x"}
- {RTT_BSP_NAME: "essemi_es32vf2264", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "essemi/es32vf2264"}
#- {RTT_BSP_NAME: "fm33lc026", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "fm33lc026"} #GCC
- {RTT_BSP_NAME: "fm33lc026", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "fm33lc026"}
- {RTT_BSP_NAME: "frdm-k64f", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "frdm-k64f"}
#- {RTT_BSP_NAME: "ft2004", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ft2004"} #编译错误
- {RTT_BSP_NAME: "ft32_ft32f072xb-starter", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ft32/ft32f072xb-starter"}
Expand Down
15 changes: 9 additions & 6 deletions bsp/fm33lc026/libraries/FM/FM33xx/Include/core_cm0plus.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
#define __WEAK __attribute__((weak))
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpacked"
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#pragma clang diagnostic pop
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

Expand All @@ -106,7 +107,8 @@
#define __NO_RETURN __attribute__((noreturn))
#define __USED __attribute__((used))
#define __WEAK __attribute__((weak))
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __ICCARM__ ) /* IAR Compiler */
Expand All @@ -116,7 +118,7 @@
#define __NO_RETURN __noreturn
#define __USED
#define __WEAK __weak
// struct __packed T_UINT32 { uint32_t v; };
/* struct __packed T_UINT32 { uint32_t v; };*/
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __TI_ARM__ ) /* TI ARM Compiler */
Expand All @@ -126,7 +128,8 @@
#define __NO_RETURN __attribute__((noreturn))
#define __USED __attribute__((used))
#define __WEAK __attribute__((weak))
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __TASKING__ ) /* TASKING Compiler */
Expand Down Expand Up @@ -195,8 +198,8 @@

#endif

#include "core_cminstr.h" /* Core Instruction Access */
#include "core_cmfunc.h" /* Core Function Access */
#include "core_cmInstr.h" /* Core Instruction Access */
#include "core_cmFunc.h" /* Core Function Access */

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
#define __WEAK __attribute__((weak))
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpacked"
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#pragma clang diagnostic pop
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

Expand All @@ -106,7 +107,8 @@
#define __NO_RETURN __attribute__((noreturn))
#define __USED __attribute__((used))
#define __WEAK __attribute__((weak))
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __ICCARM__ ) /* IAR Compiler */
Expand All @@ -116,7 +118,7 @@
#define __NO_RETURN __noreturn
#define __USED
#define __WEAK __weak
// struct __packed T_UINT32 { uint32_t v; };
/* struct __packed T_UINT32 { uint32_t v; };*/
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __TI_ARM__ ) /* TI ARM Compiler */
Expand All @@ -126,7 +128,8 @@
#define __NO_RETURN __attribute__((noreturn))
#define __USED __attribute__((used))
#define __WEAK __attribute__((weak))
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
struct __attribute__((packed))T_UINT32
{ uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)

#elif defined ( __TASKING__ ) /* TASKING Compiler */
Expand Down Expand Up @@ -195,8 +198,8 @@

#endif

#include "core_cminstr.h" /* Core Instruction Access */
#include "core_cmfunc.h" /* Core Function Access */
#include "core_cmInstr.h" /* Core Instruction Access */
#include "core_cmFunc.h" /* Core Function Access */

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion bsp/fm33lc026/rtconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
DEVICE = ' -mcpu=cortex-m0 -mthumb -ffunction-sections -fdata-sections'
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T libraries/FM/FM33xx/Source/Templates/gcc/linker/fm33lc02x_flash.ld'

CPATH = ''
LPATH = ''
Expand Down

0 comments on commit 1950825

Please sign in to comment.