Skip to content

Commit 362bb0e

Browse files
committed
Add TOOLCHAIN_GCC_CR support
1 parent 6c0a0e1 commit 362bb0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hal/common/retarget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ extern "C" void __iar_argc_argv() {
563563
// Provide implementation of _sbrk (low-level dynamic memory allocation
564564
// routine) for GCC_ARM which compares new heap pointer with MSP instead of
565565
// SP. This make it compatible with RTX RTOS thread stacks.
566-
#if defined(TOOLCHAIN_GCC_ARM)
566+
#if defined(TOOLCHAIN_GCC_ARM) || defined(TOOLCHAIN_GCC_CR)
567567
// Linker defined symbol used by _sbrk to indicate where heap should start.
568568
extern "C" int __end__;
569569

@@ -614,7 +614,7 @@ extern "C" caddr_t _sbrk(int incr) {
614614
#endif
615615
#endif
616616

617-
#if defined TOOLCHAIN_GCC_ARM
617+
#if defined(TOOLCHAIN_GCC_ARM) || defined(TOOLCHAIN_GCC_CR)
618618
extern "C" void _exit(int return_code) {
619619
#else
620620
namespace std {
@@ -638,7 +638,7 @@ extern "C" void exit(int return_code) {
638638
while (1);
639639
}
640640

641-
#if !defined(TOOLCHAIN_GCC_ARM)
641+
#if !defined(TOOLCHAIN_GCC_ARM) && !defined(TOOLCHAIN_GCC_CR)
642642
} //namespace std
643643
#endif
644644

0 commit comments

Comments
 (0)