When I do that I get a couple of warnings and then an error at link time, due to me not using the prelude (-D_ATS_CCOMP_PRELUDE_NONE_).
Here's the output: In file included from DATS/hello_dats.c:15: DATS/hello_dats.c: In function 'mainats_0_void': DATS/hello_dats.c:254:19: warning: implicit declaration of function 'atspre_g1int_mul_int' [-Wimplicit-function-declaration] 254 | ATSINSmove(tmp11, atspre_g1int_mul_int(ATSPMVi0nt(240), ATSPMVi0nt(160))) ; | ^~~~~~~~~~~~~~~~~~~~ /usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove' 276 | #define ATSINSmove(tmp, val) (tmp = val) | ^~~ DATS/hello_dats.c: In function 'loop_1': DATS/hello_dats.c:312:18: warning: implicit declaration of function 'atspre_g0int_mod_int' [-Wimplicit-function-declaration] 312 | ATSINSmove(tmp8, atspre_g0int_mod_int(arg0, ATSPMVi0nt(0x8000))) ; | ^~~~~~~~~~~~~~~~~~~~ /usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove' 276 | #define ATSINSmove(tmp, val) (tmp = val) | ^~~ DATS/hello_dats.c:322:18: warning: implicit declaration of function 'atspre_g1int_add_int' [-Wimplicit-function-declaration] 322 | ATSINSmove(tmp9, atspre_g1int_add_int(arg0, ATSPMVi0nt(1))) ; | ^~~~~~~~~~~~~~~~~~~~ /usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove' 276 | #define ATSINSmove(tmp, val) (tmp = val) | ^~~ DATS/hello_dats.c: In function 'ATSLIB_056_prelude__lt_g1int_int__2__1': DATS/hello_dats.c:418:21: warning: implicit declaration of function 'atspre_g1int2int_int_int' [-Wimplicit-function-declaration] 418 | ATSINSmove(tmp4__1, atspre_g1int2int_int_int(arg1)) ; | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove' 276 | #define ATSINSmove(tmp, val) (tmp = val) | ^~~ DATS/hello_dats.c:423:24: warning: implicit declaration of function 'atspre_g1int_lt_int' [-Wimplicit-function-declaration] 423 | ATSINSmove(tmpret3__1, atspre_g1int_lt_int(arg0, tmp4__1)) ; | ^~~~~~~~~~~~~~~~~~~ /usr/lib/ats2-postiats-0.4.2/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove' 276 | #define ATSINSmove(tmp, val) (tmp = val) | ^~~ arm-none-eabi-gcc -o out.elf asm/crt0.o DATS/hello_dats.o -Tgba.lds -nostartfiles /nix/store/xzgbmyz4qdfycbk88mmdszk86w5z9qar-gcc-arm-embedded-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: DATS/hello_dats.o: in function `mainats_0_void': hello_dats.c:(.text+0x18): undefined reference to `atspre_g1int_mul_int' /nix/store/xzgbmyz4qdfycbk88mmdszk86w5z9qar-gcc-arm-embedded-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: hello_dats.c:(.text+0x34): undefined reference to `atspre_g0int_mod_int' /nix/store/xzgbmyz4qdfycbk88mmdszk86w5z9qar-gcc-arm-embedded-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: hello_dats.c:(.text+0x50): undefined reference to `atspre_g1int_add_int' /nix/store/xzgbmyz4qdfycbk88mmdszk86w5z9qar-gcc-arm-embedded-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: hello_dats.c:(.text+0x5c): undefined reference to `atspre_g1int2int_int_int' /nix/store/xzgbmyz4qdfycbk88mmdszk86w5z9qar-gcc-arm-embedded-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: hello_dats.c:(.text+0x68): undefined reference to `atspre_g1int_lt_int' collect2: error: ld returned 1 exit status make: *** [Makefile:31: hello.gba] Error 1 ice.r...@gmail.com schrieb am Freitag, 21. Mai 2021 um 00:51:57 UTC: > Hi, > try to place > ``` > #include "share/atspre_staload.hats" > ``` > at the top of of your module > >> >> -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/2ceea4ca-3a68-4987-8133-871524e3dbf2n%40googlegroups.com.