See the earlier email in this chain from Robert Wessels noting that
libraries have to appear after the file that references their
contents.  Try:

msp430-gcc -mmcu=msp430g2231 core.o -o hd-test.elf -L../libhd44780
-lhd44780-4bit

Peter

On Sun, Sep 16, 2012 at 8:02 PM, Orlando Arias <orlandoar...@gmail.com> wrote:
> Hey, Peter, thanks for that answer. I just tested it on my system the
> snippet compiles just fine if using logf().
>
> Now, sorry to derail the conversation, but I am still having issues with
> the library I wrote.
>
> Compiling the library:
>
> [tron@HAL9000 libhd44780]$ make
> Making release build...
> msp430-gcc -Os -c hd44780.c -o hd44780.o -mmcu=msp430g2231
> -DF_CPU=1000000UL -std=gnu99 -Wall
> msp430-ar -r libhd44780-4bit.a hd44780.o
> msp430-size hd44780.o
>    text    data     bss     dec     hex filename
>     572       0       2     574     23e hd44780.o
> Done.
>
> Compiling the core file:
>
> [tron@HAL9000 hd-test]$ make
> Making release build...
> msp430-gcc -Os -c core.c -I../libhd44780 -mmcu=msp430g2231
> -DF_CPU=1000000 -std=gnu99 -Wall
> core.c:39:6: warning: return type of 'main' is not 'int' [-Wmain]
> msp430-gcc -L../libhd44780 -lhd44780-4bit -mmcu=msp430g2231 core.o -o
> hd-test.elf
> core.o: In function `main':
> core.c:(.init9+0x8): undefined reference to `hd_init'
> core.c:(.init9+0x16): undefined reference to `putchar'
> collect2: ld returned 1 exit status
> make: *** [link] Error 1
>
> Amusingly, if I link directly to the .o file generated when compiling
> the library, it works ok:
>
> [tron@HAL9000 hd-test]$ make debug
> Making debug build...
> msp430-gcc -g -c core.c -I../libhd44780 -mmcu=msp430g2231
> -DF_CPU=1000000 -std=gnu99 -Wall
> core.c:39:6: warning: return type of 'main' is not 'int' [-Wmain]
> msp430-gcc -mmcu=msp430g2231 ../libhd44780/hd44780.o core.o -o
> hd-test.elf
>>>> FIRMWARE SIZE <<<
> msp430-size hd-test.elf
>    text    data     bss     dec     hex filename
>     782      44       4     830     33e hd-test.elf
>
>
> Is there anything I am missing?
>
> On Sun, 2012-09-16 at 19:48 -0500, Peter Bigot wrote:
>> There is no double (64-bit) support in the mspgcc toolchain, only
>> float (32-bit), with double being equivalent.  While most math
>> libraries have both float and double entrypoints (e.g., sin() is
>> simply a wrapper around sinf()), it appears log() only exists as
>> logf().  Please file this as a bug on the tracker, but it won't be
>> high priority since it appears to have always been this way.
>>
>> Since double isn't supported, it's probably best to not use it, rather
>> than mislead the maintainer into thinking it's actually available.
>> Use "float", and then use the corresponding functions like "logf".
>>
>> Peter
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to