[Tack-devel] Bare metal PDP-11 developer toolchain
Moved to https://github.com/davidgiven/ack
                
                Brought to you by:
                
                    dtrg
                    
                
            
            
        
        
        
    | 
     
      
      
      From: Béla B. <bel...@gm...> - 2025-04-21 19:06:28
      
     
   | 
Hello again, I'm looking for a toolchain that would allow me to develop simple programs in C for a PDP-11/05, which do not need the services of the operating system. I found several sources on the net, where different solutions were tried for this purpose, with more or less success. What I tried so far was the GCC cross-compiler with PDP-11 a.out output, partly with the newlib C library and some custom-implemented libc functions. I just made a very simple "Hello Word" test program, for which I used my own crt0 startup file and linker script. One problem is that PDP-11 support is no longer typical in modern development environments, and another problem is that even the theoretically small and simple newlib libc functions are very complicated and result in large code, which is not good for me, because on my own PDP-11/05 machine a total of 16kB of memory is available, but in the SIMH emulator only a maximum of 56kB. During my research I found ACK, which I liked in several ways. It is good that it has the complete libc and I like it from the point of view that the code is simple and readable and the code of libc and system functions can be easily customized. I would of course make the UNIX function call stubs so that the compiled program works without an operating system. But then ACK itself can be easily compiled and run on a modern Linux. So far, for me this is the most promising compiler to implement my idea. However, there are a few problems that I don't know how to solve with ACK. One is that it would be nice to have an assembly file output that shows the specific memory addresses set by the linker alongside the instructions, and the file also contains the assembly code of all external functions that the program uses, just like in the gcc output .s files. The other is that since there is no file system on the machine, instead of the a.out output, I would actually only need a binary output file that starts at address 0. At this address, there is only a jump instruction to the first instruction of crt0. How can I solve these with ACK? Best regards, Béla  |