Los Frijoles
Member
For several years I have been messing around with microcontrollers in a very bare-bones fashion with breadboards and discrete components. I have never used a pre-built platform like arduino or teensy. Next week I am going to be starting a contest project for my university which requires us to use a Teensy 3.1 and so I have a few questions.
First, let me explain why I want to avoid the arduino IDE as the topic title suggests (I can be convinced otherwise...this is just based on my observations):
While I don't consider myself "set in my ways", there are certain things that disturb me about the arduino IDE in relation to code management, namely the apparent lack of header files in projects. I understand that there are libraries and there are "sketches" and from what I have seen, it seems expected that all of the user code goes into a "sketch" while the libraries are written in straight up C or C++ with header files and all. While it seems to support multiple files in a project, I really prefer the more "standard" method of writing code where I define my header files with public "interfaces" and then I flesh out the functions in "modules" located in C files. I may just not be looking in the right place or pressing the right buttons (I generally avoid IDE's altogether
), but it seems that this sort of organization is not possible with the arduino IDE.
However, if the arduino IDE does things in the same way C# does where there are no header files and all files are considered as one, I guess I can work with that too. I haven't looked deep enough to know if this what it will do...
Now, to relate this to the teensy stuff:
I know the teensy 3.1 uses a nice ARM processor. The pages I have read on this site seem to point to the teensyduino addon as the only way to develop for this board. As I understand it, teensyduino is simply an add-on to the arduino IDE with some libraries for using the on-chip peripherals and such. So here are my questions:
Also, just as a matter of knowledge: Is it possible to overwrite the USB bootloader on the teensy 3.1? I don't intend to, but I previously used a bootloader for the PIC 18F and in order for it to work properly, the program had to be compiled knowing about the bootloader so that it wouldn't overwrite the bootloader during programming (or fail to program because the boot segment of memory was protected). Is there something similar being done here or does the uploading program do all the translation and such? Is it possible to brick the chip by uploading code that doesn't take into account the space used for the bootloader? I really don't want to have to figure out how to fix a bricked teensy because I accidentally overwrote the bootloader somehow.
Thank you very much in advance for helping to alleviate my ignorance.
First, let me explain why I want to avoid the arduino IDE as the topic title suggests (I can be convinced otherwise...this is just based on my observations):
While I don't consider myself "set in my ways", there are certain things that disturb me about the arduino IDE in relation to code management, namely the apparent lack of header files in projects. I understand that there are libraries and there are "sketches" and from what I have seen, it seems expected that all of the user code goes into a "sketch" while the libraries are written in straight up C or C++ with header files and all. While it seems to support multiple files in a project, I really prefer the more "standard" method of writing code where I define my header files with public "interfaces" and then I flesh out the functions in "modules" located in C files. I may just not be looking in the right place or pressing the right buttons (I generally avoid IDE's altogether
However, if the arduino IDE does things in the same way C# does where there are no header files and all files are considered as one, I guess I can work with that too. I haven't looked deep enough to know if this what it will do...
Now, to relate this to the teensy stuff:
I know the teensy 3.1 uses a nice ARM processor. The pages I have read on this site seem to point to the teensyduino addon as the only way to develop for this board. As I understand it, teensyduino is simply an add-on to the arduino IDE with some libraries for using the on-chip peripherals and such. So here are my questions:
- How can I compile, in a cross platform fashion (this has to be done on Windows and Linux), without being stuck with the arduino IDE? Perhaps a makefile or something that includes all the fun libraries that come with teensyduino?
- If I must use the ardiuno IDE, can I organize my project in the normal fashion? Is even necessary? I just like organizing my code predictably so that I don't have to sort through 10,000 lines in a single file.
Also, just as a matter of knowledge: Is it possible to overwrite the USB bootloader on the teensy 3.1? I don't intend to, but I previously used a bootloader for the PIC 18F and in order for it to work properly, the program had to be compiled knowing about the bootloader so that it wouldn't overwrite the bootloader during programming (or fail to program because the boot segment of memory was protected). Is there something similar being done here or does the uploading program do all the translation and such? Is it possible to brick the chip by uploading code that doesn't take into account the space used for the bootloader? I really don't want to have to figure out how to fix a bricked teensy because I accidentally overwrote the bootloader somehow.
Thank you very much in advance for helping to alleviate my ignorance.