Pre-Premain - Very Early Init


I want to init an I/O port early. Like the first instruction the RCM3200 executes.

I am using DC9.25. Yes an old one.

I can see and tried using the #GLOBAL_INIT macro, but that doesn’t appear to execute very early.

In the call stack in the map file I see a premain mentioned.

On other compilers, I would add an .init0 section.

How can I do a similar thing with Dynamic C?


Well, I tried taking a copy of Program.Lib and using my own copy with early code.

Still seemed slow. Does the CPU have a long stabilization time or something?

Since there is no ASM dump it’s hard to see what’s really going on.