ARM Cortex-M - Static array dyamically allocated

Mike none at none.com
Sat Dec 21 02:34:29 PST 2013


On Saturday, 21 December 2013 at 10:14:18 UTC, Timo Sintonen 
wrote:
>>>
>>> Hi Mike,
>>>
>>> the arm-old branch has a new frontend version (2.064), the 
>>> official
>>> gdc-4.8 branch is at (2.063) but I'll push an update today.
>>>
>>> Anyway, dmd 2.064 behaves the same way, it seems dmd 2.064 is 
>>> pickier
>>> with object.d files. But what fixed it for me: Add a 'module 
>>> object;'
>>> line to your object.d file.
>>
>> That was it.  Thank you so much (I probably should have though 
>> of that myself).
>>
>> My Minimal semihosted ARM Cortex-M Hello World is compiling 
>> with GDC and *executing* on my hardware.  If feel silly saying 
>> so, but I'm so excited to see the words "hello" appear on my 
>> screen.
>>
>> I'll update the D Wiki today with my code.  Thanks everyone 
>> for the help.
>
> Yes, it had to be something simple because library files are 
> not different from other program files.

I was wondering about that.  I couldn't tell if the library files 
received some extra treatment or not.

>
> But then, what is the default module name of that file?

Yep, just added "module object;" at the top of object.d.  I guess 
that's how it knows its the *real* object.d.

> Gdc does not have a default search path and if I add -I. the 
> current dir should be the search root.

I believe I have made false assumption that GDC looks in root 
"include" folder of my toolchain for .di files and the root "lib" 
folder for .a files.  I may be jumping to conclusions.


> Should the module name then default to the file name?
> Is there a way to query and print the full module name at 
> compile time?

Good questions, I'd like to know these myself. Iain? Johannes?


More information about the D.gnu mailing list