mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-09-27 08:54:48 +00:00
arm: fixing libc
This commit is contained in:
parent
949e216c69
commit
70eee2bdae
16
presets/arm32/skeleton.armtcc
Normal file
16
presets/arm32/skeleton.armtcc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define SERIAL_OUT ((int*)0x4000048)
|
||||||
|
|
||||||
|
void putchar_(char c) {
|
||||||
|
*SERIAL_OUT = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int x = 2024*2;
|
||||||
|
x /= 2; // TODO: we need this to bring in __aeabi_uldivmod() etc.
|
||||||
|
printf("Hello World! %d\n", x);
|
||||||
|
return 0;
|
||||||
|
}
|
@ -359,8 +359,8 @@ export var PLATFORM_PARAMS = {
|
|||||||
arch: 'arm32',
|
arch: 'arm32',
|
||||||
define: ['__ARM__', 'DISABLE_UNIMPLEMENTED_LIBC_APIS', 'PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT'],
|
define: ['__ARM__', 'DISABLE_UNIMPLEMENTED_LIBC_APIS', 'PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_SOFT'],
|
||||||
extra_compile_args: ['-I./arch/arm/include', '-I./openlibm/include', '-I./openlibm/src', '-I./printf/src'],
|
extra_compile_args: ['-I./arch/arm/include', '-I./openlibm/include', '-I./openlibm/src', '-I./printf/src'],
|
||||||
extra_link_files: ['crt0.c', 'arm-libtcc1.a', 'libc.a'],
|
extra_link_files: ['crt0.c', 'libtcc1.a', 'libc.a'],
|
||||||
extra_link_args: ['arm-libtcc1.a', 'libc.a'],
|
extra_link_args: ['-ltcc1', '-lc'],
|
||||||
crt0: 'crt0.c',
|
crt0: 'crt0.c',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user