You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!

TFE of Omega

New user? Tell us about yourself!
hildenborg
Posts: 7
Joined: 09 Jan 2024 18:21

Re: TFE of Omega

Post by hildenborg »

nokturnal wrote: 10 Jan 2024 18:37 hi! I would be interested in remote debugging part details. Well cross compiling too (I'm also using cross compilers for ST and up my projects). I've worked on prototype of DAP protocol for ST and up (used in VScode for instance), but still I don't have a stub to talk to ;(.. And of course it needs more work too.. And yeah, Grotesque was great.. :)
If you are interested in what I am working on, I have a git repo at: https://bitbucket.org/hildenm/omegadev/src/master/
It's in a bit of kaos right now, as I recently decided to do a complete restructuring and major rewrite of most of the stuff...
There is a absolutely minimal wiki (that will have lots of documentation added... Sometime...) https://bitbucket.org/hildenm/omegadev/wiki/Home
The wiki page describes a little bit of how to get started, but sadly enough the gdbserver that I have written from scratch isn't working for the moment. I had it working before I rewrote it, so I excpet it to work as soon as I find a little bit of time to work on it again.
nokturnal
Posts: 100
Joined: 12 Aug 2020 12:30
Location: Warsaw

Re: TFE of Omega

Post by nokturnal »

@hildenborg Thanks. So, after quick glance you have prepared custom gcc elf toolchain, gdb, converter elf->prg(?), ported newlib to replace standard libc and made custom gdbserver. How abi looks like? Do you have something like fastcall support (pushing function variables to registers instead of stack?). I've looked into schematics too, so you have made acsi interface for serial communication, that's interesting. Why you decided to use it (probably speed?) and what are the features (level of control over machine with it)? Do you support symbols and source level debugging?
I'm using Vincent Riviere/Thorsten Otto cross compilers right now with vasm (http://tho-otto.de/crossmint.php) have you seen them? What are modifications you have made in toolchain related to m68k/tos (besides crt startup, newlib etc.., adding bindings fo os functions(bios/xbios..))? Your version looks like "more self contained". Also Vincent / Thorsten gcc needs some work to reduce binary sizes, but there's libcmini, which helps a little (I personaly went another way, use custom startup, remove libc dependencies with absolute minimum stuff to develop like memory allocation, strings etc..). As far I know there were some issues with gdb debugging (it is not usable atm, I think breakpoints/single stepping is broken), so the only possibility to debug programs is to output symbols usable by monst / adebug (traditional-format).
There's also another brownelf gcc variant brownelf by ggn, it produces elf binaries, which need to be converted to prg via dedicated tool (as post build step). Vincent/Thorsten gcc has elf variant too, but they don't need extra tools somehow (I didn't dig into it much, but it looks like this elf version is developed and will become new standard at some point and will phase out old 'aout' way, which needs to be readded after each gcc version update)..
For debugging I've originally went minimal gdbstub way (hacked exisiting gdbstub sample, because my projects mostly require access to real hardware), but I think I've stuck with serial communications at some point (probably I will return to it after finishing DAP stuff). I've also wanted support for newer mc68k processors(like 060) and source level debugging. I've considered both serial and ethernet communications and thought about integrating stub into uiptool (which uses netusbee (ethernet/usb on cartridge port) and some other ethernet devices via usb/cartridge port (on any st) along other things). Right now it can upload and execute programs remotely for instance and is self contained(uses built in tcp/ip stack).
Sorry for a wall of text, I'm interested in anything that's related to speeding up iteration / development times.. :) Imho debugging on Atari is much inferior to stuff present on other platforms.
saulot/[nokturnal]
------------------------
www: https://nokturnal.pl
hildenborg
Posts: 7
Joined: 09 Jan 2024 18:21

Re: TFE of Omega

Post by hildenborg »

@nokturnal
So while I have the tendency to just throw myself into complex stuff, that doesn't neccessarily mean that I know what I am doing :)
Basically, I started from the idea: "Huh, this shouldn't be too hard", and then had to learn and read up on a lot more stuff than I expected...
What I mean is: many of the things I have made is not based on choices, but more of a try and try again attitude.
So by saying that, lets go through your questins and see where that will get us.

ABI and fastcall:
I have not given any thought about fastcall, but apart from the gdbserver itself, that shouldn't be any problem to include.
Regarding ABI, my main goal have been to support just the very basic Atari binary executable formats - like .prg, .ttp etc.

Serial comm:
So, the serial comm is actually not being done through ACSI. Rather the same circuit that do the ACSI to SD, also do USB to RS232. The RS232 is connected to the Atari modem port.
I deliberately chosed this to make it possible to use any standard USE to serial cable and not impose the use of my hardware.
The real reason I made my own hardware from the beginning for ACSI to SD, is that at the time I started all this, the existing hardware options wre not up to my satisfaction.
Also, my solution also shares the Atari image on the SD card as a USB stick to a PC, so it simplifies moving the compiled binary to real Atari hardware.
I even support USB sharing of TOS formatted drives, something I think I am the first one doing.

Symbols:
Yes, I do support full symbolic debugging.
The way I do it is actually really simple:
The linking scripts used creates ELF files where the text, data and bss segments are packed in the exact same way that they will be in the PRG file.
So when doing remote debugging with gdb, gdb is told to use the debugging symbols from the ELF file.
When gdb then remote communicates with the gdbserver, it will do a "qOffsets" query that will return the addresses where the segments have been loaded.
This information is used by gdb to show you the correct memory addresses and symbols.

Mint cross tools:
I may have the wrong assumptions here, so correct me if I am wrong. But is it possible to build standard prg files that will run on any old Atari?
I had the assumption that you needed Mint to run them?
Anyway, I wanted to use the latest version of gcc that supported m68k, and using newlib is a very easy way to quickly support all C/C++ libs in one go.
In fact, you could write C++17 software that runs on an unmodified original 520ST with my toolchain.

Bindings:
Instead of writing bindings to all OS functions, I chosed to just add those needed at the moment. Reasoning that doing this all by myself, I needed to minimalize the work and not just add things that would stay untested for a long time.
For the sake of binary size, I have four different linker scripts that can be selected depending on your needs.
Those scripts also use different crts that will enable different functionality, like: if you don't use C++, then you don't need the crt to handle creation and deletion of global class instances.
Or if you just want to write a demo that doesn't care about nice entry/exit, then there is a script for that.
As an example, the current gdbserver binary using only C code, is 6409 bytes in size.


I really would love to see a working gcc toolchain with remote debugging for the Atari ST, and I am very open to discuss how to finalize that goal.
Also, sorry if I am a bit slow answering... I am recovering from a really nasty mental burnout a few years ago, so sometimes I just chose to not look at the computer for a while :)

And a little bonus clip: https://youtu.be/icndB9psmBo?si=Nv5i7a3ovl3NfYK0
That is a proof of concept demonstration I did two years ago on a very unstable hardware and very bugged software.
nokturnal
Posts: 100
Joined: 12 Aug 2020 12:30
Location: Warsaw

Re: TFE of Omega

Post by nokturnal »

@hildenborg This is awesome stuff. You should post about it on https://www.atari-forum.com coding forum (this one is more hardware oriented). I think that this omega server part is quite neat. I can see an opportunity to incorporate this gdbserver into uiptool (launch gdbserver integrrated into uiptool, which is ran usually from auto folder on hd or deploy it via uiptool to hd via ethernet and execute it to automate manual tasks). Your stub could have an option to switch protocols (i guess gdb server uses standard gdb protocol, DAP is much 'heavier', everything is via json's and could translate everything sent from vscode into 'gdb' way).
Regarding *mint compilers this name is really unfortunate, you certainly can create software for ST with them (they support various target processors from m68k to 060 and Coldfire), but using standard libc is overkill for plain ST (binaries are too big (100-150kib of bloat in simple hello world application) and you have to supply your own, needed parts, supply extra switches to compiler etc..). It takes time to setup everything and there's no actual manual how put everything together(it took me years to figure everything out). Libc and mintlib were created to have FreeMint/TOS interoptability and ease software porting from unix world to Atari, alot of this is useless if you are doing 'bare metal' programming. There are premade os bindings (#include "mint/osbind.h" and mint/ostruct.h, maybe "cookie.h" for some well known hardware cookie ID's), which contain standard os structures, oscalls are made with gcc inline assembler (this is only thing, which I use today(it's part of separate 'mintlib'), the other things like startup, strings, memory management etc. I supply on my own.). For fastcall there is gcc patch, so I think you could just apply it, so there is possibility to pass function parameters via registers, not usual stack. Your way of elf handling is similar to brownelf approach by ggn. I currently set up everything to in "toolchain" agnostic way, so I can use different versions of toolchains(on Windows(Cygwin)/Linux) and switch them easily. I've used those toolchains with SCons and CMake build systems without issues.. You can use latest C++ there too (,which imho is dumpster fire nowadays), but I usually constraint myself to C99 and up with m68k assembly.
And don't worry about reply times, Atari is not full time job for everyone :)..
saulot/[nokturnal]
------------------------
www: https://nokturnal.pl

Return to “INTRODUCE YOURSELF”

Who is online

Users browsing this forum: CCBot and 57 guests