STM32L4 Core

Cores are the underlying magic that make the Arduino API possible
User avatar
mrburnette
Posts: 1779
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: STM32L4 Core

Postby mrburnette » Sat Jun 11, 2016 12:39 am

GrumpyOldPizza wrote:<...>
Let's go back as to why folks use Arduino. They have no clue, but want to get something done. They need to experiment and learn. You learn best from making mistakes.


There are a lots of "me's" around that can & do use professional tools but stick with the Arduino System because I (they) want their code public and easily duplicated. ArduinoIDE provides a workable, free, repeatable, cross-platform set of tools. Compared to some of my forum peers, the use of "no clue" may be appropriate, but it really does not answer the "why." Arduino is a common denominator for publishing code projects.

Ray

User avatar
GrumpyOldPizza
Posts: 173
Joined: Fri Apr 15, 2016 4:15 pm
Location: Denver, CO

Re: STM32L4 Core

Postby GrumpyOldPizza » Sat Jun 11, 2016 11:56 am

mrburnette wrote:
GrumpyOldPizza wrote:<...>
Let's go back as to why folks use Arduino. They have no clue, but want to get something done. They need to experiment and learn. You learn best from making mistakes.


There are a lots of "me's" around that can & do use professional tools but stick with the Arduino System because I (they) want their code public and easily duplicated. ArduinoIDE provides a workable, free, repeatable, cross-platform set of tools. Compared to some of my forum peers, the use of "no clue" may be appropriate, but it really does not answer the "why." Arduino is a common denominator for publishing code projects.

Ray


My choice of words was perhaps inappropriate. I did not intend to imply that necessarily all Arduino users share the same type of beginners level as the platform was intended for, nor did I want to preclude other motives to use the platform or IDE. The point was simply that the Arduino platform is primarily targeted at the tinkerer who does not necessarily have a full understanding a priori, but explores solutions along the way of experimentation.

Seasoned software developers have learned (probably the hard way) that you do some things one way and one way only. Keeping ISRs short and avoid anything in there that would block is one such example. But for somebody who is either fairly new, or simply more concerned about her/his project as a whole, this is not intuitive. Hence it is utmost important that a Arduino Core behaves in an expected and predictable way under any circumstances. Whether it is optimal or not does not matter.

In reality the API is horribly inadequate, not specified very well and many implementations barely pass the minimum criteria of functionality. However all of this does not seem to matter as the ecosystem still enables a lot of individuals to get a lot of things done.

Where I am coming from is totally different. I got sucked into all of this because I am utterly bad at hardware. I always wanted to explore a low power Driver/HAL/RTOS infrastructure at the micro controller level. What is required to do that ? How do you do clock gating ? How do you efficiently sleep, and how do you profile that ? How much can be done at a system level behind a HAL/Driver abstractions ? Can this be done without the use of an RTOS (i.e. explicit locking) and such. Along comes Kris with his incredible talent of actually being able to design those little boards, and what he is lacking is an Arduino environment for them, because he is all hardware and not software. Hence the thought of simply merging the type of software layer for low power with an Arduino Core, and see how much can be done there. And for me personally it was surprising how much functionality could be offered there, and how few extensions to the "official API" were required to get most of the things in place that I was accustomed to from more advanced environments (like async IO). But what really struck me is that with this really simple API I suddenly could convey more advanced concepts to others.

Anyway, one of the biggest challenges going forward for Arduino is fragmentation. You got now a ESP8266 core, the existing AVR/SAM/SAMD cores, then there is Energia and the LeafLabs Maple based core on this forum, and everybody does things slightly different. And that is really bad, because this precludes portability. That is the main reason the STM32L4 core picked "Arduino Zero" as a point of reference and follows the simple guideline of "if it works and Arduino Zero, it has to work the same way on STM32L4", whether I agree with the approach chosen or not.

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

Re: STM32L4 Core

Postby mrburnette » Sat Jun 11, 2016 2:05 pm

Fragmentation is inevitable and when viewed from a high altitude is more akin to evolution. As the Arduino environment was designed to provide a usable microprocessor platform for the non-computer group the computer group took immediate interest and started to apply more traditional computer science principles: such pressure did force gradual changes and Arduino IDE and cores evolved to include a wider range of uC options. As the concept grew and matured, it became like a child absorbing both from parents and external influences.

Arduino is now her own being and is a product of the parents, teachers, environment, and her childhood friends. There are powerful commercial interests such as Intel pushing themselves in what has become an ever increasing numbers of suitors seeking her sole affection... but for now, she seems to just want to play the field and not settle down.

Of what I am certain is that the increasing commercialism will force the IDE to be more accomodating to flexibility. We only need to look at Linux to see what can evolve from a concept.

Ray

User avatar
Pito
Posts: 994
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: STM32L4 Core

Postby Pito » Sun Jun 12, 2016 10:24 am

Holy Grail of IT industry - Omnipotentuino.. :lol:
Pukao Hats Cleaning Services Ltd.

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

Re: STM32L4 Core

Postby zmemw16 » Sun Jun 12, 2016 10:52 am

:lol: :lol: :lol: :lol: :lol:

User avatar
GrumpyOldPizza
Posts: 173
Joined: Fri Apr 15, 2016 4:15 pm
Location: Denver, CO

Re: STM32L4 Core

Postby GrumpyOldPizza » Tue Jun 14, 2016 2:49 am

Just put up 0.0.11 a few hours ago. There was a critical DMA bug in the FLASH/SRAM1/SRAM2 tracking that escaped testing.

User avatar
GrumpyOldPizza
Posts: 173
Joined: Fri Apr 15, 2016 4:15 pm
Location: Denver, CO

Re: STM32L4 Core

Postby GrumpyOldPizza » Mon Jul 18, 2016 4:38 pm

GrumpyOldPizza wrote:Just put up 0.0.11 a few hours ago. There was a critical DMA bug in the FLASH/SRAM1/SRAM2 tracking that escaped testing.


Haven't updated this in a while (much background work going on). I just put up 0.0.12 on Saturday. Tons of small fixes. "DOSFS" now supports VFAT and UTF8 file names (latter one not very well tested). There is a define hidden in variant.cpp, ARDUINO_STM32L4_DOSFS_SDCARD that for debugging purposes allows to use a SDCARD on SPI over the builtin serial flash. I hope to upgrade the code real soon to allow parallel use (and SDIO support). A new EEPROM emulation has been added to support the Arduino aequivalent of 1k EEPROM.

inaba_nl
Posts: 9
Joined: Thu Jul 14, 2016 9:07 pm

Re: STM32L4 Core

Postby inaba_nl » Mon Jul 18, 2016 8:22 pm

no worries, just make sure you don't overwork yourself :)


also, i have put this on a github page about stm32 external flash storage (just not sure if it'll work)


Code: Select all

in the linker script there needs to be:

EXTFLASH (rw) : ORIGIN = 0x<start address>, LENGTH = 0x<length>

in the MEMORY section, and the SECTIONS needs to have:

.external_flash : { *(.External_Flash*); } > EXTFLASH

now we can start to have fun with adding code to the qspi flash.
to make it easy, use this define in the sketch:

#define EXTERNAL_MEM __attribute__((section("External_Flash")))

and usage can look like this:

EXTERNAL_MEM void external_loop()
{
  while (1)
  {
    //blink led forever
    digitalWrite(13,LOW);
    delay(500);
    digitalWrite(13,HIGH);
    delay(500);
  }
}


usefull on this subject: http://www.st.com/content/ccc/resource/ ... uto,67,614

also, i can barely wait till a rtos is supported (my preference: FreeRTOS) :D

that reminds me, once i got the money i defenitely need to order some dragonfly boards.

User avatar
Rick Kimball
Posts: 790
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: STM32L4 Core

Postby Rick Kimball » Mon Jul 18, 2016 8:54 pm

inaba_nl wrote:.. also, i can barely wait till a rtos is supported (my preference: FreeRTOS) ..

I know it isn't true multi-tasking, however have you looked at the Scheduler library that works with the DUE and Zero? It provides cooperative multi-tasking. Your task runs to completion as long as you don't yield. I've tried it and it seems to work OK for trivial things. I haven't tried on anything substantial.
-rick

rajdarge
Posts: 56
Joined: Thu Oct 29, 2015 10:27 am

Re: STM32L4 Core

Postby rajdarge » Tue Jul 19, 2016 1:21 am

so I just bought a few of these from tindie.
I was expecting the super-capacitor pictured (I think thats what it was). Its no biggie that it wasn't, but it did take a little shine off the product.
Unfortunately I am one of those with "no clue" with a full time job in another area. So time is an obstacle.
However I am not daunted by my lack of time.
I would like to know if there is a forum somewhere devoted to this device, and a quickstart guide or something.
I have used a teensy 3.1 and 3.2 as I have a few of those. But I suppose I'd like to get into it and get my project done... without having to stuff around with trial an error.
Raj


Return to “Cores”

Who is online

Users browsing this forum: No registered users and 1 guest