-
Notifications
You must be signed in to change notification settings - Fork 3k
Removed all references to __CC_ARM #12654
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,75 +43,8 @@ | |
* @param number_of_ms | ||
*/ | ||
/*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ | ||
#if defined ( __CC_ARM ) | ||
|
||
static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) | ||
{ | ||
loop | ||
SUBS R0, R0, #1 | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
#ifdef NRF52 | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
NOP | ||
#endif | ||
BNE loop | ||
BX LR | ||
} | ||
|
||
#elif defined ( __ICCARM__ ) | ||
#if defined ( __ICCARM__ ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not provide the proper replacement for ARM compiler 6 assembler ? |
||
|
||
static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) | ||
{ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,42 +49,7 @@ | |
* | ||
* @note This function will never return but issue a reset into provided application. | ||
*/ | ||
#if defined ( __CC_ARM ) | ||
__asm static void bootloader_util_reset(uint32_t start_addr) | ||
{ | ||
LDR R5, [R0] ; Get App initial MSP for bootloader. | ||
MSR MSP, R5 ; Set the main stack pointer to the applications MSP. | ||
LDR R0, [R0, #0x04] ; Load Reset handler into R0. This will be first argument to branch instruction (BX). | ||
|
||
MOVS R4, #0xFF ; Load ones to R4. | ||
SXTB R4, R4 ; Sign extend R4 to obtain 0xFFFFFFFF instead of 0xFF. | ||
MRS R5, IPSR ; Load IPSR to R5 to check for handler or thread mode. | ||
CMP R5, #0x00 ; Compare, if 0 then we are in thread mode and can continue to reset handler of bootloader. | ||
BNE isr_abort ; If not zero we need to exit current ISR and jump to reset handler of bootloader. | ||
|
||
MOV LR, R4 ; Clear the link register and set to ones to ensure no return, R4 = 0xFFFFFFFF. | ||
BX R0 ; Branch to reset handler of bootloader. | ||
|
||
isr_abort | ||
; R4 contains ones from line above. Will be popped as R12 when exiting ISR (Cleaning up the registers). | ||
MOV R5, R4 ; Fill with ones before jumping to reset handling. We be popped as LR when exiting ISR. Ensures no return to application. | ||
MOV R6, R0 ; Move address of reset handler to R6. Will be popped as PC when exiting ISR. Ensures the reset handler will be executed when exist ISR. | ||
MOVS r7, #0x21 ; Move MSB reset value of xPSR to R7. Will be popped as xPSR when exiting ISR. xPSR is 0x21000000 thus MSB is 0x21. | ||
REV r7, r7 ; Reverse byte order to put 0x21 as MSB. | ||
PUSH {r4-r7} ; Push everything to new stack to allow interrupt handler to fetch it on exiting the ISR. | ||
|
||
MOVS R4, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R0 when exiting ISR (Cleaning up of the registers). | ||
MOVS R5, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R1 when exiting ISR (Cleaning up of the registers). | ||
MOVS R6, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R2 when exiting ISR (Cleaning up of the registers). | ||
MOVS R7, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R3 when exiting ISR (Cleaning up of the registers). | ||
PUSH {r4-r7} ; Push zeros (R4-R7) to stack to prepare for exiting the interrupt routine. | ||
|
||
MOVS R0, #0xF9 ; Move the execution return command into register, 0xFFFFFFF9. | ||
SXTB R0, R0 ; Sign extend R0 to obtain 0xFFFFFFF9 instead of 0xF9. | ||
BX R0 ; No return - Handler mode will be exited. Stack will be popped and execution will continue in reset handler initializing other application. | ||
ALIGN | ||
} | ||
#elif defined ( __GNUC__ ) | ||
#if defined ( __GNUC__ ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is GCC assembly language compatible with ARMC6 ? |
||
static inline void bootloader_util_reset(uint32_t start_addr) | ||
{ | ||
__asm volatile( | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the clang pragma instead when the file is compiled with ARMC6 ?
Please have a look at: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0742b/chr1398848167694.html