SDCC + Eclipse

By andrear1979

Expert (96)

andrear1979's picture

13-05-2010, 18:10

I tried the Eclipse IDE to develop C programs for MSX, and I took
notes at every step. If you are interested/curious, I typed these notes
on a webpage of my personal website.

There's no strict dependence on the compiler used, so this could be adapted
to Hitech-C or other cross-compilers available.

I'm also curious about the favourite enviroment of you MSX programmers,
so report your compiler+IDE environment if you wish.

Login or register to post comments

By Leo

Paragon (1236)

Leo's picture

13-05-2010, 18:48

interesting , if only msx had jtag to do step by step debug

By konamiman

Paragon (1046)

konamiman's picture

13-05-2010, 21:22

I definitely have to take a look at that. I have switched to SDCC as my primary tool for MSX development (together with Compass and blueMSX for debugging), but currently I am using a simple text editor (EditPad Lite) for source code editing.

By andrear1979

Expert (96)

andrear1979's picture

13-05-2010, 22:00

I tried Eclipse+SDCC because I were already used to Eclipse+MinGW, but many other IDE are equally good or better (I think to CodeBlocks or Dev-C++, but didn't try them).

Nice points of Eclipse:

  • the error messages of SDCC are parsed correctly (click on an error in the log and you are sent to the wrong line of code)
  • code coloring for .c files and somewhat for .asm files
  • hover on a function name and the function definition appears as a hint
  • select a function name and press Ctrl+Alt+H = show call hierarchy tree for that function

Bad points of Eclipse:

  • eats too much RAM and disk!
  • the __asm / __endasm blocks aren't parsed correctly (code is highlighted in yellow, as if there would be a warning)
  • you can see that my notes are somewhat long and boring Eek! , i.e. probably it's a bit too long to install and configure
  • rather obviously, I cannot debug directly (I use to call BlueMSX, load some symbols if needed, and activate its debugger)

I'm also curious about the environment chosen by asm-only MSX developers, I guess that not many good choices exist for that case.

By Yukio

Paragon (1541)

Yukio's picture

13-05-2010, 23:51

Interesting article. Maybe, I should try this later ...

By andrear1979

Expert (96)

andrear1979's picture

14-05-2010, 00:20

(click on an error in the log and you are sent to the wrong line of code)
Tongue ahem... I meant: "you are sent to the exact line that was written with wrong syntax"

By konamiman

Paragon (1046)

konamiman's picture

14-05-2010, 11:57

By the way, I have a problem with the z80.lib library on the latest versions of SDCC. When I try to manage them with sdcclib, I get the message "ERROR: File z80.lib was not created with sdcclib". Anyone has experienced something similar?

By andrear1979

Expert (96)

andrear1979's picture

14-05-2010, 12:17

hi Konamiman, don't have sdcc at hand now, but I remember
something about use of "ar" instead of "sdcclib". Not sure, sorry.
(ar could be in the MinGW distribution)

By ToriHino

Champion (385)

ToriHino's picture

02-04-2018, 13:13

Hi,

It's an old thread but I tried your setup using Eclipse (Oxygen) for SDCC but have some questions:

  1. It just doesn't take the path setting for SDCC, i only get it working now by putting the full path for each SDCC binary in the makefile
  2. Looks like either zip file (from Avelino and yours crt0 zip) do not contain the char.rel (or it's source) where the example is referring to
  3. I had to change crt0msx.4000.rel to crt0msx.32k.4000.rel in the makefile

Any thoughts on this?