pcawte / agdev Goto Github PK
View Code? Open in Web Editor NEWPort to Agon Light of TI-84-CE C/C++ Toolchain which uses LLVM and generates eZ80 ADL code
License: GNU Lesser General Public License v3.0
Port to Agon Light of TI-84-CE C/C++ Toolchain which uses LLVM and generates eZ80 ADL code
License: GNU Lesser General Public License v3.0
When I run make on hello_world:
[compiling] src/main.c
In file included from src/main.c:10:
/Users/chrisg/Agdev/include/stdio.h:4:10: fatal error: 'cdefs.h' file not found
#include <cdefs.h>
^~~~~~~~~
1 error generated.
make: *** [obj/src/main.c.bc] Error 1
Did I miss a step?
AgDev examples don't build due to _printf
symbol confilct, other symbols are missing or duplicated.
tests/args
example:/home/chandler/Documentos/agon-ce-c-toolchain/tests/args $ make V=1
mkdir -p 'bin'
echo [linking] bin/args.bin
[linking] bin/args.bin
/home/chandler/CEDev/bin/fasmg -v1 '/home/chandler/CEDev/meta/ld.alm' -i 'DEBUG := 0' -i 'HAS_PRINTF := 1' -i 'HAS_LIBC := 1' -i 'HAS_LIBCXX := 1' -i 'PREFER_OS_CRT := 0' -i 'PREFER_OS_LIBC := 1' -i 'ALLOCATOR_STANDARD := 1' -i 'include "/home/chandler/CEDev/meta/linker_script"' -i 'range .bss $D052C6 : $D13FD8' -i 'provide __stack = $D1A87E' -i 'locate .header at $D1A87F' -i map -i 'source "obj/icon.src", "/home/chandler/CEDev/lib/crt/crt0.src", "obj/lto.src"' -i 'library "/home/chandler/CEDev/lib/libload/fatdrvce.lib", "/home/chandler/CEDev/lib/libload/fileioc.lib", "/home/chandler/CEDev/lib/libload/fontlibc.lib", "/home/chandler/CEDev/lib/libload/graphx.lib", "/home/chandler/CEDev/lib/libload/keypadc.lib", "/home/chandler/CEDev/lib/libload/msddrvce.lib", "/home/chandler/CEDev/lib/libload/srldrvce.lib", "/home/chandler/CEDev/lib/libload/usbdrvce.lib"' bin/args.bin
flat assembler version g.kaqg
/home/chandler/CEDev/meta/ld.alm [1568]:
macro ? [1295]:
read source
:read? [14] (CALM)
assemble :temp [1]:
include?! '../lib/libc/printf.src'
/home/chandler/CEDev/meta/../lib/libc/printf.src [8]:
public _printf
public? [26] (CALM)
Error: definition of ':globals._printf' in conflict with already defined symbol.
make: *** [/home/chandler/CEDev/meta/makefile.mk:293: bin/args.bin] Error 2
tests/vdu
example:/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu $ make V=1
mkdir -p 'obj/src'
echo [compiling] src/vdp_vdu.c
[compiling] src/vdp_vdu.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/vdp_vdu.c' -o 'obj/src/vdp_vdu.c.bc'
mkdir -p 'obj/src'
echo [compiling] src/vdu.c
[compiling] src/vdu.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/vdu.c' -o 'obj/src/vdu.c.bc'
echo [lto opt] obj/lto.bc
[lto opt] obj/lto.bc
/home/chandler/CEDev/bin/ez80-link '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/src/vdp_vdu.c.bc' '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/src/vdu.c.bc' -o '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.bc'
/home/chandler/CEDev/bin/ez80-clang -S -mllvm -profile-guided-section-prefix=false -Wall -Wextra -Oz '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.bc' -o '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.src'
mkdir -p 'obj'
echo [convimg] description
[convimg] description
/home/chandler/CEDev/bin/convimg --icon-output 'obj/icon.src' --icon-format asm --icon-description "Ag C Toolchain Demo"
mkdir -p 'bin'
echo [linking] bin/vdu.bin
[linking] bin/vdu.bin
/home/chandler/CEDev/bin/fasmg -v1 '/home/chandler/CEDev/meta/ld.alm' -i 'DEBUG := 0' -i 'HAS_PRINTF := 1' -i 'HAS_LIBC := 1' -i 'HAS_LIBCXX := 1' -i 'PREFER_OS_CRT := 0' -i 'PREFER_OS_LIBC := 1' -i 'ALLOCATOR_STANDARD := 1' -i 'include "/home/chandler/CEDev/meta/linker_script"' -i 'range .bss $060000 : $09FFFF' -i 'provide __stack = $D1A87E' -i 'locate .header at $D1A87F' -i map -i 'source "obj/icon.src", "/home/chandler/CEDev/lib/crt/crt0.src", "obj/lto.src"' -i 'library "/home/chandler/CEDev/lib/libload/fatdrvce.lib", "/home/chandler/CEDev/lib/libload/fileioc.lib", "/home/chandler/CEDev/lib/libload/fontlibc.lib", "/home/chandler/CEDev/lib/libload/graphx.lib", "/home/chandler/CEDev/lib/libload/keypadc.lib", "/home/chandler/CEDev/lib/libload/msddrvce.lib", "/home/chandler/CEDev/lib/libload/srldrvce.lib", "/home/chandler/CEDev/lib/libload/usbdrvce.lib"' bin/vdu.bin
flat assembler version g.kaqg
/home/chandler/CEDev/meta/ld.alm [1568]:
macro ? [1295]:
read source
:read? [14] (CALM)
assemble :temp [1]:
include?! '../lib/libc/fclose.c.src'
/home/chandler/CEDev/meta/../lib/libc/fclose.c.src [43]:
extern _mos_fclose
extern? [12] (CALM)
Error: symbol ':globals._mos_fclose' is undefined or out of scope.
make: *** [/home/chandler/CEDev/meta/makefile.mk:293: bin/vdu.bin] Error 2
tests/exit
example:/home/chandler/Documentos/agon-ce-c-toolchain/tests/exit $ make V=1
mkdir -p 'obj/src'
echo [compiling] src/exit.c
[compiling] src/exit.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/exit.c' -o 'obj/src/exit.c.bc'
src/exit.c:21:8: error: use of undeclared identifier 'EXIT_ABORT'
exit( EXIT_ABORT );
^
1 error generated.
make: *** [/home/chandler/CEDev/meta/makefile.mk:340: obj/src/exit.c.bc] Error 1
ez80-clang
, ez80-link
and fasmg
/home/$USER/CEDev/bin
folder$PATH
environment variable/home/$USER/CEDev
foldertests
folder -` chandler@pc-quarto
.o+` ------------------
`ooo/ OS: Arch Linux x86_64
`+oooo: Host: B450 I AORUS PRO WIFI
`+oooooo: Kernel: 6.7.1-arch1-1
-+oooooo+: Uptime: 2 days, 3 hours, 22 mins
`/:-:++oooo+: Packages: 1871 (pacman)
`/++++/+++++++: Shell: zsh 5.9
`/++++++++++++++: Resolution: 3840x2160
`/+++ooooooooooooo/` DE: GNOME 45.3
./ooosssso++osssssso+` WM: Mutter
.oossssso-````/ossssss+` WM Theme: Adwaita
-osssssso. :ssssssso. Theme: HighContrastInverse [GTK2/3]
:osssssss/ osssso+++. Icons: Adwaita [GTK2/3]
/ossssssss/ +ssssooo/- Terminal: kgx
`/ossssso+/:- -:/+osssso+- CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
`+sso+:-` `.-/+oso: GPU: AMD ATI Radeon RX 6600/6600 XT/6600M
`++:. `-/+/ Memory: 5750MiB / 15912MiB
.` `/
Following the directions in the Readme.md to install the toolchain everything seems to be ok.
When compiling some code (args demo) it gives me (with the fab-agon-Emulator 0.9.11) Invalid executable.
I am using it in the following procedure:
1- Start the Emulator with: fab-agon-emulator --firmware quark (I am using the Official Quark VDP emulator as well) 2- Type *BYE to exit from BBC Basic 3- load args.bin 4-run &040000 Hello World Invalid executable
The code is compiling simply invoking the command: make
[compiling] src/args.c [lto opt] obj/lto.bc [convimg] description [linking] bin/args.bin [success] bin/args.8xp, 8462 bytes.
The same problem is with the bin or 8xp file.
Can you help me out?
Regards,
Gianluca
I can get HelloWorld.c to almost build after copying some files from
I get the same error building
I get this error from the
-linker_script
Hi Paul,
Really appreciate all the work you've put into bringing this toolchain up, it's made my work (as someone who prefers C to BASIC or ASM but who struggles with the dated Zilog toolchain) much, much more productive.
At the moment you make use of the MOS centisecond timer (which is at half resolution) in order to provide the underlying "millis" for time.h, which is a neat way of using an existing resource and works perfectly for many uses. However, I'm working on porting my audio demo code to your toolchain and that depends on much tighter timers (for me, it needs to be at least ~50us per tick).
Would you be willing to consider adapting Jeroen's existing ez80f92 timer code (here and here) to offer a higher resolution underlying timebase? Being selfish as I say it'd be great if clock() could return a figure based around the microsecond range (albeit at a lowish resolution ticking up by 25 every 25us or similar).
Regards,
Greg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.