Author Topic: One Dollar One Minute ARM Development  (Read 135192 times)

0 Members and 1 Guest are viewing this topic.

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #325 on: December 08, 2014, 02:06:27 am »
BTW, I've managed to make a "pruned" version of the gcc toolset from launchpad.net that is "only" a ~16MB download.
(no C++, no tlo, no cortex-A libraries. no FPU support, etc.)  It still needs some work to include the ST includes and startup code, and it's about 8x larger than Paulie's asm-only set of tools, but it's not so bad for a full C compiler.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #326 on: December 09, 2014, 03:48:28 am »
Oh my. 16 megabytes is a far cry from the hundreds for the standard package. That certainly sounds like it qualifies as minimum development and yet a serious tool. Maybe big competition for SDCC which I lament not being available for any of the ARMs. Please report and hopefully provide links when up an running.
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: One Dollar One Minute ARM Development
« Reply #327 on: December 09, 2014, 06:57:56 am »
I don't know that I'm up to writing mathematical algorithms in assembler.  I have to admit that when some cpu vendor says something like "we've added saturated multiple and accumulate instructions for DSP applications", I have trouble imagining what sort of algorithms they're supposed to help with.  The earliest DSPs were just starting to appear when I graduated from college, but I spent my career pretty far away from "math"...

DSP instructions often help with "everyday" math being done on microcontroller, but I find that in most cases you need to go to at least -o2 for the compiler to make all the obvious conversions. For example a good compiler can convert a long array access loop into smaller number of SIMD instructions. Another thing is, that a typical Cortex-M4F is still shit compared to a "real" dsp processor with multiple ALU's, heardware loop logic, multiple adress registers, multiple memory busses, 64 bit SIMD engines and so on. A simple example is a standard 2048pt 32-bit fixed point real FFT (quite a frequently used case). My CM4 running at 120MHz executes FFT in about 2.5-3ms using CMSIS-DSP lib. The same operation on some smaller TI Piccolo processor takes some microseconds.
I love the smell of FR4 in the morning!
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6687
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #328 on: December 09, 2014, 08:54:16 am »
2048 point fft in some microseconds on a microcontroller dsp hybrid, that doesn't sound right.
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: One Dollar One Minute ARM Development
« Reply #329 on: December 09, 2014, 01:10:07 pm »
Ok, perhaps it wasn't piccolo, my bad. Anyway i it was some low model from TMS320 family, C54 or C55 I think.
I love the smell of FR4 in the morning!
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6687
  • Country: nl
Re: One Dollar One Minute ARM Development
« Reply #330 on: December 09, 2014, 03:48:25 pm »
Still doesn't sound right, I will agree though ... the lack of zero overhead looping and the combination of single issue with a load/store architecture makes Cortex-M4 poorly suited suited for DSP. You can code around most of it, but it takes a lot more effort.

It's a shame TI is the only one doing anything with Piccolo, it was a far better DSP architecture than what we get on all these other ARM micros.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute... ARMduino !!!
« Reply #331 on: December 16, 2014, 09:32:39 pm »
I do have a genuine Maplemini but couldn't get it to work at all. I wonder if anybody has ever succeeded in installing or running the blinky?

Ok... nobody else in the world seems to have got that running so here's an update from yours truly. SUCCESS! Not with the original Maple package which appears to be a total flop but from a team of hotshots that ported STM32f103 over to Arduino. Unbelievably easy to program, unbelievably powerful/flexible, and... that's right... unbelievably cheap. Fully assembled STMF103 boards with next chip up from the Ebay or DIY versions but less than $4 shipped.

I've been playing around with not only Blinky, but SD card and RF demos. As usual with Arduino they just up and run first try. With 1.5.8 installed it really does take less than a minute to setup and go.

ps. If there's interest I'll put up some links and photos.
« Last Edit: December 16, 2014, 09:39:19 pm by paulie »
 

Offline gibbled

  • Regular Contributor
  • *
  • Posts: 102
  • Country: ca
  • VE7 call sign
Re: One Dollar One Minute ARM Development
« Reply #332 on: December 17, 2014, 06:03:16 pm »
I'm interested Paulie...
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #333 on: December 17, 2014, 07:34:40 pm »
Heh.. For a minute there I though it was just the three of us (me, myself, and I). IMO this is the biggest deal to come along in a long time. Right now ARM is one of the hottest topics on this and just about every other MCU forum. All it needs is for somebody to tame it with something like Arduino. Eclipse and the other "professional" toolsets are really not for beginners. Disliked by many professionals too.

Anyway here's the fellow who managed to take it out of Mapleleafs hands when they dropped the ball and polish it into something useful to beginners and experienced alike:

http://www.rogerclark.net/stm32f103-and-maple-maple-mini-with-arduino-1-5-x-ide/

There are some more links to put up when I get a chance but that one strikes me as most complete and easy to follow (I don't believe it, two well done websites in one week). I'll take some photos of my own setup too. Did I mention this works great on the $1 DIY board?
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: One Dollar One Minute ARM Development
« Reply #334 on: December 18, 2014, 03:23:54 pm »
I heard here


that maple labs is not interested in low margin boards, and wont work on cheap stm32 stuff anymore
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #335 on: December 18, 2014, 07:59:13 pm »
Actually it was very high margin product when they were getting $40 each. Naturally chinese IP thieves jumped on that and started cranking them our for a tenth the cost. THEN they sorta lost interest. Kinda like what happened with Arduino company. Deja vu all over again.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #336 on: December 19, 2014, 03:36:38 am »
So... you realize that most of what Roger has done is to get the Arduino High level libraries (SPI, I2C, etc) up-to-date (1.x based APIs rather than 00xx based)?  I thought you didn't approve of such high-level coding :-)

"Maple" was the first attempt at porting the Arduino environment to a different chip, done back when official support was pretty much AVR m8/m168 only.  They didn't to a great job at figuring out how to do that, and the subsequent arduino modifications happened in incompatible ways, but I'm not sure "dropped the ball" is a fair condemnation.  I'm pretty happy with their "exit strategy"; the HW designs, SW efforts, and a bunch of "documentation" stayed open source, and was invaluable in the current attempts to reinstate support.


Quote
maple labs ... wont work on cheap stm32 stuff anymore
That's true; leaflabs says as much: http://leaf-labs.squarespace.com/about-maple/

It's largely irrelevant; as this thread has postulated from the beginning, there is now LOTS of cheap ST32F hardware out there, and Rogers current efforts are a good starting point to having a lot of it work under the Arduino environment.  (It's ALSO one of the first efforts to add a third-party package to the new multiplatform 1.5.x Arduino framework, which is IMO pretty important completely separately from the ST connection.)
 

Offline paulieTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #337 on: December 20, 2014, 02:18:16 pm »
I thought you didn't approve of such high-level coding :-)

HaHa... The truth is I'm a huge fan of HLL. Particularly compilers like Microchip C and Winavr because they are compact and efficient. Specially the earlier versions. But it's true I do like the assemblers for those and use them a lot. SDCC has taken my fancy lately too. In addition to the STM8 it motivated me to dust off some old CPM boards and an AVR Z80 emulator.

It's laughable to see how infatuated some people are with HLL. Multi-page programs (OOPS is right!) and kbytes or even megabytes to toggle a bit instead of half dozen bytes of clean code. BLOATWARE? For some reason not so thrilling.

Arduino was not a favorite either until recently seeing what can be done to ease the pain of ARM programming.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #338 on: December 20, 2014, 03:51:46 pm »
We'll see how the noob set responds to git get when the next meeting comes up this weekend..

Git also provides a link to download the repository as a zip file. May me easier than having to deal with the git client.
 

Offline fortran77

  • Newbie
  • Posts: 1
  • Country: se
Re: One Dollar One Minute ARM Development
« Reply #339 on: March 08, 2016, 07:39:15 pm »
Thanks for this thread. I'm trying FASMARM and this is one of the few places I've found any assembly examples for STM32F103.
Took me about a minute to download the assembler.
I include my pin-scanner those cheap chinese boards really need one, out of 2 cpu cards 3 pins were not in contact with their pads.
Forgot to tell it's also setting up timer1 for 72MHz pwm outputs on pin A8-A11 also some other code in there.

BTW this is not my normal alias but I thought the year of my first language would be nice here!

Also any help with updating the register include file would be appreciated.
« Last Edit: March 09, 2016, 06:34:04 pm by fortran77 »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #340 on: March 13, 2016, 12:51:50 am »
Quote
any help with updating the register include file would be appreciated.
Do you understand EMACS?
Three EMACS keyboards macros (included at the end of the .asmh file) are iterated over a merged .h file, to accomplish:

1) Convert "#define X Y" to ".equiv X, Y"
2) Convert "typedef struct { stuff } foo_t;" to "STRUCTDEF foo / stuff / ENDSTRUCT
3) Covert arrays like "uint32_t dummy[n];" (inside the structs) to "uint32_ta dummy, n"

Note that a bunch of "normal" C keywords (like "uint8_t") are redefined as gnu-as macros, which greatly reduces the the amount and complexity of the work that the editor macros have to do.

Also note that the process is very specific to the way that ST structures their files.  I've come across other vendors that have separate files for each peripheral, and nested structures/unions/etc.  It would take a lot of changes to similarly pre-process those files for use as gnu-as use. :-(

It might be possible to come up with a set of sed scripts that do the same thing.  They'd be equally incomprehensible to read, but easier to run.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4192
  • Country: us
Re: One Dollar One Minute ARM Development
« Reply #341 on: June 23, 2016, 11:50:49 pm »
I've added an assembler/bare-metal "blink" example for the Atmel SAMD10 Xplained Mini board.
It's designed to be opened in Atmel Studio, and demonstrates a way to set up an assembler project in AS, as well as being a trivial SAMD10 demo.  (Atmel Studio is NOT a "lightweight development environment", though!)

Observation: Cortex M0 is annoying.  While "nominally" just another ARM variant, the three-instruction delay loop that I had implemented for CM3 had EVERY instruction rejected as invalid on the CM0.  :-(
Code: [Select]
    mov r1, #(4*1024*1024) // Constant is too large for thumb16
                       //  (doesn't allow shift during mov)
delay:
    subs r1, #1     // doesn't like "subs" (wants "sub"
                    // (even though the listing shows subs !)
    bne.n delay     // Doesn't like ".n" (all thumb16 branches are "near"?)
                    //  (again, the listing shows "bne.n"...)

All the constants in the Atmel .h files have trailing "U" designators, even in the "#ifdef __ASSEMBLY__" parts.  Grr.
(Crap like this is one of the things that make assembly programming increasingly unpleasant.)

https://github.com/WestfW/Minimal-ARM/blob/master/Atmel/samd10asmBlink/samd10asmBlink/main.S
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf