Variable types in Arduino IDE
Posted: Fri Apr 03, 2020 9:40 pm
After years of use of the arduino IDE + Roger's core that kept evolving, I had a rather poor development environment that I would be unable to rebuild in case of a crash, due to the number of fixes and tweaks that were accumulated over time.
I have decided to build a new environment on a fresh machine, and I have installed Arduino 1.8.12 to which I added the STM32 board collection of the official repository (stm32duino/Arduino_core_STM32 from github), plus the STM32CubeProgrammer.
This worked rather easily.
Now I am starting to port my sketches and my special libraries to this environment, and I have a problem with the data types.
Previously I used libmaple_types.h as the base for declarations. It provided me with the definitions of uint8, int8, uint16, int16, uint32, and int32.
This library was obviously a legacy from the long defunct maple leaflabs environment. So, what can I do now to get these definitions? Does the STM32 core provide for this, even if the names are different?
I have checked the help file of the Arduino IDE, and I get a confusing landscape.
byte and unsigned byte are ok.
integer and unsigned integer are 16-bit long for AVR chips, but are 32-bit long for Arduino Due. What for STM32?
long integer and unsigned long integer are 32-bit long for AVR chips, but they say nothing about the Arduino Due.
Is there an official convention for the STM32 core?
I have decided to build a new environment on a fresh machine, and I have installed Arduino 1.8.12 to which I added the STM32 board collection of the official repository (stm32duino/Arduino_core_STM32 from github), plus the STM32CubeProgrammer.
This worked rather easily.
Now I am starting to port my sketches and my special libraries to this environment, and I have a problem with the data types.
Previously I used libmaple_types.h as the base for declarations. It provided me with the definitions of uint8, int8, uint16, int16, uint32, and int32.
This library was obviously a legacy from the long defunct maple leaflabs environment. So, what can I do now to get these definitions? Does the STM32 core provide for this, even if the names are different?
I have checked the help file of the Arduino IDE, and I get a confusing landscape.
byte and unsigned byte are ok.
integer and unsigned integer are 16-bit long for AVR chips, but are 32-bit long for Arduino Due. What for STM32?
long integer and unsigned long integer are 32-bit long for AVR chips, but they say nothing about the Arduino Due.
Is there an official convention for the STM32 core?