Git Product home page Git Product logo

agdev's People

Contributors

astralaster avatar blastbrothers avatar envenomator avatar pcawte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agdev's Issues

Missing cdefs.h when compiling the example (Macos)

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?

Definition of ':globals._printf' in conflict with already defined symbol

Issue

AgDev examples don't build due to _printf symbol confilct, other symbols are missing or duplicated.

Output

  1. Testing the 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
  1. Testing the 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
  1. Testing the 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

How to Reproduce

  1. Download, build and install ez80-clang, ez80-link and fasmg
  2. Make a Symbolic Link to /home/$USER/CEDev/bin folder
  3. Add the directory to $PATH environment variable
  4. Clone the CE C/C++ Toolchain
  5. Clone AgDev repository
  6. Copy the root folder contents from AgDev repository to the CE C/C++ Toolchain folder
  7. Build the CE C/C++ Toolchain
  8. Install to /home/$USER/CEDev folder
  9. Build any example from tests folder

System Specs

                   -`                    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 
 .`                                 `/

Invalid executable in the fab-agon-emulator

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

Won't Build on MacOS

I can get HelloWorld.c to almost build after copying some files from

  • CEdev/src/libc/include/
    to
  • CEdev/include/

I get the same error building

  • sprite_demos/invaders/

I get this error from the
-linker_script

  • % make
    [linking] bin/DEMO.bin
    eval [9] /Users/snake/CEdev/meta/linker_script [27]:
    order .header, .libs, .init, .fini, .init.args, .init.bss, .text, .data, .rodata
    Processed: order .header, .libs, .init, .fini, .init.args, .init.bss, .text, .data, .rodata
    Error: illegal instruction.
    make: *** [bin/DEMO.bin] Error 2

Timers (or revising clock)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.