diff --git a/os/common/ports/ARMCMx/chcore_v7m.c b/os/common/ports/ARMCMx/chcore_v7m.c index 5b1816c81..77038eb47 100644 --- a/os/common/ports/ARMCMx/chcore_v7m.c +++ b/os/common/ports/ARMCMx/chcore_v7m.c @@ -301,7 +301,7 @@ void port_init(os_instance_t *oip) { /** * @brief Setting up MPU region for the current thread. */ -void _port_set_region(void) { +void __port_set_region(void) { mpuSetRegionAddress(PORT_USE_GUARD_MPU_REGION, chThdGetSelfX()->wabase); diff --git a/os/common/ports/ARMCMx/chcore_v7m.h b/os/common/ports/ARMCMx/chcore_v7m.h index 02995a63f..e5712fac5 100644 --- a/os/common/ports/ARMCMx/chcore_v7m.h +++ b/os/common/ports/ARMCMx/chcore_v7m.h @@ -578,11 +578,11 @@ struct port_context { if ((stkalign_t *)(r13 - 1) < (otp)->wabase) { \ chSysHalt("stack overflow"); \ } \ - __port_switch(ntp, otp); \ + __port_switch(ntp, otp); \ } #else #define port_switch(ntp, otp) { \ - _port_switch(ntp, otp); \ + __port_switch(ntp, otp); \ \ /* Setting up the guard page for the switched-in thread.*/ \ mpuSetRegionAddress(PORT_USE_GUARD_MPU_REGION, \ diff --git a/os/various/syscalls.c b/os/various/syscalls.c index 8da8f755a..b2052e954 100644 --- a/os/various/syscalls.c +++ b/os/various/syscalls.c @@ -169,4 +169,29 @@ int _isatty_r(struct _reent *r, int fd) { return 1; } +/***************************************************************************/ + +__attribute__((used)) +void _exit(int status) { + (void) status; + chSysHalt("exit"); + abort(); +} + +/***************************************************************************/ + +__attribute__((used)) +int _kill(int pid, int sig) { + (void) pid; + (void) sig; + return -1; +} + +/***************************************************************************/ + +__attribute__((used)) +int _getpid(void) { + + return 1; +} /*** EOF ***/