Skip to content

RTL8195AM - Fix and cleanup mbed_rtx.h #5232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 9, 2017
Merged
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
15 changes: 2 additions & 13 deletions targets/TARGET_Realtek/mbed_rtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "rtl8195a.h"

#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) || (__ARMCC_VERSION >= 6010050))
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
#define ISR_STACK_START (unsigned char *)(Image$$ARM_LIB_STACK$$ZI$$Base)
Expand All @@ -33,22 +33,11 @@
#define INITIAL_SP (__StackTop)
#endif


#if defined(__CC_ARM) || defined(__GNUC__)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this redundant ? ISR_STACK_SIZE can be set for ARMCC or ARM GCC (see mbed boot code file)

Copy link
Contributor Author

@tung7970 tung7970 Oct 2, 2017

Choose a reason for hiding this comment

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

@0xc0170 ISR_STACK_SIZE is always set in the case of CC_ARM and ARMCC above.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see now. Then this should be moved to the above (ARMCC provides gnu flag that defines also GNUC macro that we use) or be completely removed? I would say to be removed, the default stack size is set. Thus not needed here ?

#if defined(__GNUC__)
#ifndef ISR_STACK_SIZE
#define ISR_STACK_SIZE (0x1000)
#endif
#endif

#ifndef OS_TASKCNT
#define OS_TASKCNT 14
#endif
#ifndef OS_MAINSTKSIZE
#define OS_MAINSTKSIZE 256
#endif
#ifndef OS_CLOCK
#define OS_CLOCK PLATFORM_CLK
#endif

#endif
#endif