Skip to content

Commit 8a2c998

Browse files
committed
[bsp][renesas] add IAR enviroment entry function and startup_check script
1 parent a1d007c commit 8a2c998

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

bsp/renesas/ra2e2-ek/SConstruct

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ Export('SDK_LIB')
4444

4545
rtconfig.BSP_LIBRARY_TYPE = None
4646

47+
def startup_check():
48+
import subprocess
49+
startup_check_path = os.getcwd() + "/../tools/startup_check.py"
50+
51+
if os.path.exists(startup_check_path):
52+
try:
53+
subprocess.call(["python", startup_check_path])
54+
except:
55+
subprocess.call(["python3", startup_check_path])
56+
57+
RegisterPreBuildingAction(startup_check)
58+
4759
# prepare building environment
4860
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4961

bsp/renesas/ra2e2-ek/ra/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ void Reset_Handler (void)
5050
SystemInit();
5151

5252
/* Call user application. */
53-
#ifdef __ARMCC_VERSION
54-
main();
55-
#elif defined(__GNUC__)
53+
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
5654
extern int entry(void);
5755
entry();
56+
#elif defined(__ICCARM__)
57+
extern void __low_level_init(void);
58+
__low_level_init();
59+
#else
60+
/* Jump to main. */
61+
main();
5862
#endif
5963

6064
while (1)

0 commit comments

Comments
 (0)