Jump to content

[Version 1] Problem Compiling With Arduino-0018 And Sdfatlib


Recommended Posts

Hi,

I am trying to compile some of the example programs that come with the SDFat library and I am getting a consistent error across every sample I try.

I have loaded teensyduino 0.9 and teensy 1.06 and imported the SDFat library.

The errors I am getting are:

from C:\John\Security\arduino-0018\libraries\SdFat\SdFile.cpp:22:

c:/john/security/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'

c:/john/security/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

c:/john/security/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

I've looked at the math.h file and don't see any errors. I even reinstalled the file in case it was corrupted but still got the same error.

Since it is occurring with all of the example programs I've tried I don't think the problem is in the example code.

Has anyone had the same problem? Any suggestions?

Link to post
Share on other sites

Update: I downloaded Arduino 0019 and the new teensyduino and teensy files and I think I may have solved the compile problem.

Need to get back home and hook up the teensy board and verify.

If that works I just need to get the PC to recognize the SD card.

Getting closer.....

Link to post
Share on other sites
Has anyone had the same problem? Any suggestions?

Try compiling for a regular Arduino. Just select it from the Tools > Boards menu, and click verify. If that compiles, please let me know. In fact, if you can, just zip up your entire arduino directory and send it to me. That might be too big of a file?

If you get the same error when compiling for Arduino, then it's probably a bug in the library or something messed up with your arduino install. You could download a fresh copy of the arduino software and try that.

Link to post
Share on other sites

Got it to work. I installed Arduino 0019 and the updated versions of teensyduino and teensy loader.

My new question is how to I get the serial monitor to work? I've selected the USB type of SDCard + Keyboard, but when I do the Serial Port menu option is grayed out.

Thanks.

Link to post
Share on other sites
My new question is how to I get the serial monitor to work? I've selected the USB type of SDCard + Keyboard, but when I do the Serial Port menu option is grayed out.

Just click on the serial monitor button. Don't worry about selecting a serial port, because there isn't any in this mode. It will "just work" (because I implemented a communication channel with a custom HID interface and hacked the serial monitor to use it in this mode)

Link to post
Share on other sites
Just click on the serial monitor button. Don't worry about selecting a serial port, because there isn't any in this mode. It will "just work" (because I implemented a communication channel with a custom HID interface and hacked the serial monitor to use it in this mode)

How do I see the Serial print output on the terminal instead of the Serial Port? Since the Teensy is in Keyboard and Sd Card mode, the serial device tty.usbmodem12341 or something like that does not show up...:(

Bits1

Link to post
Share on other sites
How do I see the Serial print output on the terminal instead of the Serial Port? Since the Teensy is in Keyboard and Sd Card mode, the serial device tty.usbmodem12341 or something like that does not show up...:(

You can't use programs like Hyperterminal or Zterm that are designed to talk with serial ports, because it's not a serial device.

In theory, you could write a terminal emulator that does HID communication, but that would be a LOT of work!!! The HID API is completely different on each operating system too. But I've already done the low-level part for you.....

Inside your arduino directory (on a mac, use option-click and "show package contents"), there's a tiny program called teensy_gateway. It talks HID protocol to the teensy and makes that communication available on TCP port 28541. When you're using the Serial Monitor in Arduino with this mode, it runs the teensy_gateway and connects to port 28541. If that program is still running, you could just use:

telnet 127.0.0.1 28541

If you can't connect, just open a command prompt and run teensy_gateway, and then telnet should be able to connect (as long as teensy_gateway remains running).

Of course, the easiest thing to do is just click the "Serial Monitor" button inside Arduino. The new one in 0019 even has a button to turn scrolling on/off, but admittedly it's still feature-poor compared to most terminal emulators. If you have one that supports telnet in addition to serial connections, you can use that with teensy_gateway.

Edited by Paul Stoffregen
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...