by-passing the arduino-e-ness?

Development of new Cores using the STMCubeMX and HAL
zmemw16
Posts: 1073
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

by-passing the arduino-e-ness?

Postby zmemw16 » Tue Sep 08, 2015 8:25 am

is it or will it be possible for users to access the HAL layer interface directly?

could we have a flag __HAL_CODE__ ?

it is perhaps not a good idea for libraries:--)

stephen

User avatar
mrburnette
Posts: 1774
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: by-passing the arduino-e-ness?

Postby mrburnette » Tue Sep 08, 2015 11:54 am

zmemw16 wrote:is it or will it be possible for users to access the HAL layer interface directly?

could we have a flag __HAL_CODE__ ?

it is perhaps not a good idea for libraries:--)

stephen



Not to be crude... but STM32duino.com core is intended to be Arduino'ish... by design. A lots of folks have put in much energy to mimic the Arduino look 'n feel of the coding syntax and library usage.

You can always utilize the STM native development environment:
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533

but, in my opinion the "A" in HAL is Abstraction... obviously, once linked, the API is available, but it is pretty low-level stuff.

Ray

zmemw16
Posts: 1073
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: by-passing the arduino-e-ness?

Postby zmemw16 » Tue Sep 08, 2015 3:01 pm

given the i2s thread currently active, some of their code is at least fairly esoteric and
'below' the arduino code; even though it'll probably be going into a library.

stephen

madias
Posts: 812
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: by-passing the arduino-e-ness?

Postby madias » Tue Sep 08, 2015 4:07 pm

Maybe right, but fact is that that arduino.cc totally neglected the potential of the Arduino Due (like I2S, SPI, DMA...) over years and only converted the standard AVR things into it. This was the point leaflabs started with own libraries.

I don't see a problem access the HAL layer interface, we have also totally access to the libmaple layer or I missed something?
I always use 80% "Arduino code" and about 20% low level things... I would say this is the real power of STM32duino -> the world of both!

User avatar
mrburnette
Posts: 1774
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: by-passing the arduino-e-ness?

Postby mrburnette » Wed Sep 09, 2015 8:55 pm

madias wrote:<...>
I don't see a problem access the HAL layer interface, we have also totally access to the libmaple layer or I missed something?
I always use 80% "Arduino code" and about 20% low level things... I would say this is the real power of STM32duino -> the world of both!



Nah, you did not miss anything, but my intent with the statement:
... mimic the Arduino look 'n feel of the coding syntax and library usage.

Was to imply the "application" and library usage syntax from within the sketch. It is my thought that the 20% low-level stuff should be in user libraries, or at least in a tab-metaphor .ino with liberal comments.
But that is just me and a style that I use in published projects.

What one does in their own, private code is of no concern except to themselves. When published, however, the visibility of the 20% can cause a cascading of blog inquiries and support questions... and a lot of wasted time for the author.


Ray

alextrezvy
Posts: 2
Joined: Wed Jan 20, 2016 9:49 pm

Re: by-passing the arduino-e-ness?

Postby alextrezvy » Wed Jan 20, 2016 10:02 pm

I'm new to MCU's programming and I can't decide what API is better to begin and grow...
I'm slightly familiar with Wiring and Arduino IDE (which is total crap and useless painful thing in my opinion, because of lacking of code navigation, code completion, refactoring helpers, convinient project management, and other tools long ago available in popular and mature IDE's such as Eclipse and CodeBlocks, which are could be used instead). Wiring seems popular framework with big community and a lot of ready stuff based on it. But how do we use modern STM32 features like USB support?

zmemw16
Posts: 1073
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: by-passing the arduino-e-ness?

Postby zmemw16 » Wed Jan 20, 2016 11:09 pm

i'm not sure what prompted the technique, but you write a very short fred.ino file having a #include /,Arduino.h> line
and a second #including "./fred.cpp; it's then more like a cpp source.

arduino wise you store it in the sketchbook folder in a folder fred containing fred.ino and fred.cpp

if you copied the Arduino.h include line into fred.cpp, i suspect you'd be able to apply the tools you're used to using
to it as the main file? you'll need the various binary, include, search and libraries paths from a verbose compilation to even create a Makefile.
that's a completely different world in Arduino(Arduino-mk) and a slowly greying black hole in Arduino_STM32; at least for me it is. :D
i was looking at Arduino-mk on hackaday yesterday and there's teensy support now available.
oh look the tab's still there
http://hackaday.com/2015/10/01/arduino-development-theres-a-makefile-for-that/
:shock:
stephen

ps.you may want to look at Cube-MX and HAL as well, as the worlds seem to be on a slow collision course.

User avatar
mrburnette
Posts: 1774
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: by-passing the arduino-e-ness?

Postby mrburnette » Thu Jan 21, 2016 12:08 am

zmemw16 wrote:i'm not sure what prompted the technique, but you write a very short fred.ino file having a #include /,Arduino.h> line
and a second #including "./fred.cpp; it's then more like a cpp source.

arduino wise you store it in the sketchbook folder in a folder fred containing fred.ino and fred.cpp

if you copied the Arduino.h include line into fred.cpp, i suspect you'd be able to apply the tools you're used to using
to it as the main file? you'll need the various binary, include, search and libraries paths from a verbose compilation to even create a Makefile.
that's a completely different world in Arduino(Arduino-mk) and a slowly greying black hole in Arduino_STM32; at least for me it is. :D
i was looking at Arduino-mk on hackaday yesterday and there's teensy support now available.
oh look the tab's still there
http://hackaday.com/2015/10/01/arduino-development-theres-a-makefile-for-that/
:shock:
stephen

ps.you may want to look at Cube-MX and HAL as well, as the worlds seem to be on a slow collision course.



:o

Good grief!

There is a reason that all commercial Pilots and Air Traffic Control all use English as the common denominator for communications... optimum word is common. The compilation in the ArduinoIDE of error free code is a common way to communicate with other makers and owners of compatible hardware. One does not have to "like" the environment, but the IDE does force some rules that help we forum members to assist and share.

It is interesting to know that the ancient (1.5x) Arduino from the Command Line methodology has some new competition, but as the Hackaday article mention, there are others.


Ray

zmemw16
Posts: 1073
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: by-passing the arduino-e-ness?

Postby zmemw16 » Thu Jan 21, 2016 7:34 am

@Ray
apologies for riling you.
my forum style can be a little (jovial, cynical, sarcastic, understated), i have a thought leapfrog issue and can be overly succinct.
actually i'm quite seriously dialled back in my postings as i once upset a Mexican and that really was quite interesting for a little bit. see above brackets :D

i'm aware to the topic and that i started it and your position in its regard, but whilst i appreciate it and do like its ease of use, the ability to drop down the abstraction level is to my mind not such a bad thing.
to me it is simply that for what i want to do it is possibly the best way. i also like perl, c and c++ programming, as you can probably tell i didn't take to Ada at all well, regardless of 3 off 5 day courses.
(the last course was 20mls each way and i did it on my first 700c hand built wheels, trued them twice in that week and not needed to since.)
i started with 6502 and it took me six months to write my first program in hex, actually it took me 5.95 months to grasp the concept of byte, shift and rotate, assembler and hex etc, then it became a so simple it's difficult to explain it thing.

understanding the aspects of hal and cubemx and how to potentially exploit them to a future 'abstraction layer' for arduino_stm32 is also to me of some interest.

i was merely pointing out that as he is aware of other tool chains, he might look at a couple of possibilities that might/could allow him to perhaps better use his knowledge of their capabilities.

hackaday was one i'm still looking at as i've tried it before in pure Arduino land and was curious about the teensy aspect with a view to stm32 use.

i pulled the items, followed upto their github repositories, even gone to read documentation about it.
i have been trying to use it as well, pointing out that i had fun with the various paths etc just seemed polite as well as it being a potential problem.

the reference to cubemx/hal was an immediate after-thought and edit, no idea why its bolded.

stephen

alextrezvy
Posts: 2
Joined: Wed Jan 20, 2016 9:49 pm

Re: by-passing the arduino-e-ness?

Postby alextrezvy » Thu Jan 21, 2016 10:42 am

mrburnette wrote:There is a reason that all commercial Pilots and Air Traffic Control all use English as the common denominator for communications... optimum word is common. The compilation in the ArduinoIDE of error free code is a common way to communicate with other makers and owners of compatible hardware. One does not have to "like" the environment, but the IDE does force some rules that help we forum members to assist and share.

As a consequence, we have to restrict ourself from using "non-common" features, such as USB, isn't it?


Return to “CubeMX and HAL”

Who is online

Users browsing this forum: No registered users and 2 guests