dave
Active member
Looking for a discussion about porting from 8 bit to ARM
Hi guys,
I m looking everywhere for a discussion opened by Paul (the brain behind Teensy) some years ago.
In this article/discussion Paul is going to explain that the most code used for Arduino (for example for reading sensors from a board like MPU-9150) cannot be directly used or imported in Teensy.
The reason was something like:
for this reason you should not import libraries used with Arduino just because they are already available and tested. The different register size of a ARM requires to know what one wants to do.
Why I m looking for it? Not because of Arduino.... but because I did some software develop 4-5 years ago and now I want to import my own code to Teensy. I'd like to not have problem like that one.
Regards
Hi guys,
I m looking everywhere for a discussion opened by Paul (the brain behind Teensy) some years ago.
In this article/discussion Paul is going to explain that the most code used for Arduino (for example for reading sensors from a board like MPU-9150) cannot be directly used or imported in Teensy.
The reason was something like:
"in Arduino (8-bit) you can do something like:
where H is the MSB and L the LSB. But in a ARM microprocessor you cannot do that, because registers are 32 bit. So the above line of code would not work correctly if used in Teensy"Code:return (int16_t)((H<<8)+L);
for this reason you should not import libraries used with Arduino just because they are already available and tested. The different register size of a ARM requires to know what one wants to do.
Why I m looking for it? Not because of Arduino.... but because I did some software develop 4-5 years ago and now I want to import my own code to Teensy. I'd like to not have problem like that one.
Regards
Last edited: