kkeeley

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Help using toolchain on custom hardware. #2628
    kkeeley
    Participant

    Hi Ket,
    Thank you for your response. To help every one understand a bit more about what I’m trying to do I will try to explain my hardware setup and what I’m currently trying to program.

    Firstly the hardware is currently based on a 68000 CPU although I am thinking of upgrading it to a 68030 or 68040 at some point, mainly so I can get the memory management unit and access more memory space. The system currently has 1Mb or RAM located at 0x000000 and 256K of Flash ROM located at 0xFC0000 it also has a dual serial interface used for as a terminal interface and an ATA interface connected to a hard drive for storage that are currently located in the 0x800000 range. I have programmed a number of features into the ROM that allows basic system access, ie displaying characters and strings on the terminal, getting characters from the terminal, reading and writing sectors from the hard drive, etc, these are all provide via Trap routines.

    At this time I have the ROM configured to upon power up or reset it will preform a checksum on the ROM followed by testing the first 4KB of RAM if both these test past it will initialize the serial interface and ATA interface. The ROM is also able to look for a master boot sector on a hard drive and if it finds a valid one it will load it into RAM and then run it. The master boot sector can handle checking and loading from different partitions on the hard drive. All of these codes have been written in pure assembly.

    Now I wish to actually write standalone executable files that either the ROM or the boot sector code can load from the hard drive into RAM and execute. Basically the start of a very basic operating system. This is where I’m looking for a bit of help, I’m looking for help on what settings/options I need to use with the compiler and linker to allow the programs to work correctly with my hardware. From what I have found so far I am going to have to write my own C runtime library to allow C code to access my hardware in a standard way.

    If anybody could help provide me samples on how to compile/link my own C runtime library and then how to use that with a simple hello world program that I can then run on my hardware, that would be great. The sample code doesn’t have to be complete, the more import part I feel is the compiler/linker options to build the files correctly.

    Hope this makes more sense now.

    Kenneth

Viewing 1 post (of 1 total)