platformio / platform-timsp430

TI MSP430: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/timsp430
Apache License 2.0
18 stars 16 forks source link

Unable to build with Launchpad MSP430FR2746 #26

Open kmkaczor opened 2 years ago

kmkaczor commented 2 years ago

Getting the errors:

/home/korey/.platformio/packages/toolchain-timsp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/include/msp430.h:1802:2: error: #error "Failed to match a default include file"

/home/korey/.platformio/packages/framework-energiamsp430/cores/msp430/Energia.h:366:26: fatal error: pins_energia.h: No such file or directory

This suggests that the msp430.h include file does not have the proper definition passed for this board. I do notice that this board is called:

lpmsp430g2476 in the files and documentation

However, it is an FRAM chip and the proper model name is with FR and not G. I.e. it should be lpmsp430fr2476 to match the other boards like this. There does not seem to be a MSP430G2476, I suppose someone mistook this chip for being a member of the G2 series.

Adding a proper JSON file for the board (in the boards directory, ~/.platformio/platforms/timsp430*/boards), replacing the MSP430G2476 with MSP430FR2476, allows compilation, and this applies both to stable and the current git development version. HOWEVER, a new error pops up:

/home/korey/.platformio/packages/toolchain-timsp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/lib/mcpu-430x/mmpy-16/libc.a(puts.o): In function `puts':
/home/robertinant/mspgcc/msp430-libc-20120224/src/./stdlib/puts.c:38: undefined reference to `putchar'
/home/robertinant/mspgcc/msp430-libc-20120224/src/./stdlib/puts.c:42: undefined reference to `putchar'

The robertinant part is, obviously, not me and suggests a precompiled static library with debug symbols. I am not heavily experienced in C programming -- perhaps the static library was not linked properly to stdio.h?

kmkaczor commented 2 years ago

It appears that the putchar errors is an Energia issue and not platformio. However, the incorrect model problem still remains.

fpedd commented 2 years ago

I second the spelling mistake of the MSP430FR2476 https://github.com/platformio/platformio-docs/pull/239