Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teensy build broken in 1.3.0 #170

Closed
hamaker opened this issue Apr 9, 2015 · 4 comments
Closed

teensy build broken in 1.3.0 #170

hamaker opened this issue Apr 9, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@hamaker
Copy link

hamaker commented Apr 9, 2015

Hi there, thanks for building platform IO, looks really cool and just the kind of thing I was looking for! Building arduino and teensy stuff without having to use a clumsy IDE! YAY!

When building my first teensy3.1 project though, I got an error message that I couldn't understand immediately (I'm not much of a C programmer, sadly):

arm-none-eabi-g++ -o .pioenvs/autogen_teensy/firmware.elf -Os -Wl,--gc-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -T /Users/niels/.platformio/packages/ldscripts/mk20dx128.ld .pioenvs/autogen_teensy/src/main.o -L.pioenvs/autogen_teensy -Wl,--start-group -lc -lgcc -lm .pioenvs/autogen_teensy/libFrameworkArduino.a -Wl,--end-group
.pioenvs/autogen_teensy/libFrameworkArduino.a(mk20dx128.o): In function `ResetHandler':
/Users/niels/code/personal/teensy/test/.pioenvs/autogen_teensy/FrameworkArduino/mk20dx128.c:763: undefined reference to `__rtc_localtime'

It turns out that this issue has actually already been fixed, in 960ecca. So this is not so much a report for the platformio devs, as for other users who have the same issue I had. It was solved by adding these lines to the teensy builder script (in my case found in /usr/local/lib/python2.7/site-packages/platformio/builder/scripts/, see commit for exact place to add them):

env.Append(
    LINKFLAGS=["-Wl,--defsym=__rtc_localtime=$UNIX_TIME"]
)

Or probably you could just update to the development version...
Cheers,
Niels

@ivankravets ivankravets added this to the 1.4.0 milestone Apr 9, 2015
@ivankravets ivankravets self-assigned this Apr 9, 2015
@ivankravets
Copy link
Member

@hamaker thanks for the feedback!

Yes, I know about it. I'm going to release 1.4.0 tomorrow. However, here is more easy solution with adding build flags to your env:

[env:your_teensy]
...
build_flags = -Wl,--defsym=__rtc_localtime=$UNIX_TIME

Does it work for you?

@hamaker
Copy link
Author

hamaker commented Apr 9, 2015

Hi @ivankravets, thanks for the quick response! Yes, that works, and indeed is a much cleaner solution, compared to my editing packaged files 😧

@ivankravets
Copy link
Member

Yep, PlatformIO is flexible and powerful instrument. However, I don't know hot to explain about it each developer 😞 Maybe, documentation isn't good. I'll work on it! 😄

@ivankravets
Copy link
Member

Sorry, I reopen this issue and will close when 1.4.0 will be released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants