-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
115 additions
and
64 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <stdint.h> | ||
#include <stdbool.h> | ||
#include "glue.h" | ||
|
||
extern uint32_t _estack; | ||
extern uint32_t _srelocate, _erelocate, _etext; | ||
extern uint32_t _sbss, _ebss; | ||
|
||
extern uint32_t Image$$STACK$$Base; | ||
extern uint32_t Image$$STACK$$Limit; | ||
|
||
int main(void); | ||
|
||
int htoi(char x) { | ||
unsigned int v=x; | ||
v-='0'; | ||
if (v<10) return v; | ||
v|=0x20; //A->a | ||
v-='a'-'0'; | ||
if (v<6) return v+10; | ||
return -1; | ||
} | ||
|
||
__attribute__ ((section (".vectors"),used)) | ||
const struct { | ||
uint32_t* SP; | ||
void* Entry; | ||
#if defined ( __CC_ARM ) | ||
}vectors = {&Image$$STACK$$Limit, main}; | ||
#else | ||
}vectors = {&_estack, main}; | ||
#endif |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
int htoi(char x); |