Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/source/mbed_crash_data_offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {
/** \ingroup mbed-os-internal */
/** \addtogroup platform-internal-api */
/** @{*/
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#if defined(__ARMCC_VERSION)
extern uint32_t Image$$RW_m_crash_data$$ZI$$Base[];
extern uint32_t Image$$RW_m_crash_data$$ZI$$Size;
#define __CRASH_DATA_RAM_START__ Image$$RW_m_crash_data$$ZI$$Base
Expand Down
14 changes: 2 additions & 12 deletions platform/source/mbed_retarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,14 @@
static SingletonPtr<PlatformMutex> _mutex;

#if defined(__ARMCC_VERSION)
# if __ARMCC_VERSION >= 6010050
# include <arm_compat.h>
# endif
# include <arm_compat.h>
# include <rt_sys.h>
# include <rt_misc.h>
# include <stdint.h>
# define PREFIX(x) _sys##x
# define OPEN_MAX _SYS_OPEN
# ifdef __MICROLIB
# if __ARMCC_VERSION >= 6010050
asm(" .global __use_full_stdio\n");
# else
# pragma import(__use_full_stdio)
# endif
# endif

#elif defined(__ICCARM__)
Expand Down Expand Up @@ -803,7 +797,7 @@ MBED_WEAK int mbed::minimal_console_putc(int c)
}
#endif // MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY

#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#if defined (__ARMCC_VERSION)
extern "C" void PREFIX(_exit)(int return_code)
{
while (1) {}
Expand Down Expand Up @@ -1084,12 +1078,8 @@ extern "C" long PREFIX(_flen)(FILEHANDLE fh)
#if !defined(COMPONENT_SPE) || !defined(TARGET_TFM)

#if !defined(__MICROLIB)
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evedon Wasn't #if defined (__ARMCC_VERSION) still required here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted. @rajkan01 we need a patch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an already existing macro guard #ifdef __ARMCC_VERSION at https://github.com/ARMmbed/mbed-os/blob/master/platform/source/mbed_retarget.cpp#L1051, so it is not required.

__asm(".global __use_two_region_memory\n\t");
__asm(".global __use_no_semihosting\n\t");
#else
#pragma import(__use_two_region_memory)
#endif
#endif

// Through weak-reference, we can check if ARM_LIB_HEAP is defined at run-time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ void mbed_toolchain_init()
With the RTOS there is not only one stack above the heap, there are multiple
stacks and some of them are underneath the heap pointer.
*/
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#if defined (__ARMCC_VERSION)
__asm(".global __use_two_region_memory\n\t");
__asm(".global __use_no_semihosting\n\t");
#else
#pragma import(__use_two_region_memory)
#endif

#define LIBSPACE_SIZE 96
Expand Down