Author Topic: Looking for kits to play around with, got knee deep in MCU wars  (Read 19943 times)

0 Members and 1 Guest are viewing this topic.

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #25 on: April 21, 2017, 03:51:01 am »
Optionally USB is a great thing to have included, but going down that path is another rabbit hole altogether  :scared:
Tell me about it... I never got around to a few projects percisely because I have no idea how to make USB work.

I have a few PIC16F1455 but never got around using them because exactly this...
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #26 on: April 21, 2017, 04:05:14 am »
You might want to look at some of PIC's USB starter kit like the Low Pin Count dev board.
Downloading the PIC MLA library shows you what codes are available for which demo boards, and their codes are quite nice and clean and have the 'state-machine' type of programming style.

... I just turned this thread into a PIC thread did I not  :palm: sorry guys, carry on
Jack of all trade - Master of some... I hope...
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #27 on: April 21, 2017, 04:11:20 am »
For ARM the GNU toolchain and Eclipse CDT is very available, and it is rumored that the Apple LLVM/clang toolchain came standard with Xcode can also be used to build programs for Cortex-M.

It can. The best way to do it for a pure MachO build is by passing "-arch armv7m" (Cortex-M3 by default) or "-arch armv7em" (Cortex-M4F, hard-float ABI) to the compiler. That'll get you a nice AAPCS ABI rather than iOS's weird and ancient APCS if you'd copied XCode's command line ("-arch armv7s -mcpu=cortex-m3").

Alternatively you could install an ELF binutils and use "-target arm-none-eabi" instead. Clang itself would then behave basically the same as it does on ELF platforms.
How to convince Eclipse CDT that Apple-shipped LLVM/clang can handle the heat?
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #28 on: April 21, 2017, 04:13:08 am »
You might want to look at some of PIC's USB starter kit like the Low Pin Count dev board.
Downloading the PIC MLA library shows you what codes are available for which demo boards, and their codes are quite nice and clean and have the 'state-machine' type of programming style.
I just have PIC16F1455 on breadboards.
... I just turned this thread into a PIC thread did I not  :palm: sorry guys, carry on
It's okay.
 

Offline TNorthover

  • Contributor
  • Posts: 42
  • Country: us
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #29 on: April 21, 2017, 04:15:49 am »
How to convince Eclipse CDT that Apple-shipped LLVM/clang can handle the heat?

I'm afraid I don't know. Most people that use those options write their own Makefiles; I've not encountered anyone trying to use Eclipse.
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1138
  • Country: fi
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #30 on: April 21, 2017, 05:59:59 am »
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...
There is nothing suspicious about that post. Someone put effort into listing the benefits and capabilities of a platform, and I think it does contribute a whole lot more than other posts; screenshot from the working environment and all.
« Last Edit: April 21, 2017, 06:02:15 am by Neganur »
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #31 on: April 21, 2017, 06:32:26 am »
You might want to look at some of PIC's USB starter kit like the Low Pin Count dev board.
Downloading the PIC MLA library shows you what codes are available for which demo boards, and their codes are quite nice and clean and have the 'state-machine' type of programming style.
I just have PIC16F1455 on breadboards.
... I just turned this thread into a PIC thread did I not  :palm: sorry guys, carry on
It's okay.

If you're willing to dig through pre-made code, I'd strongly suggest downloading Microchip's Library of Applications since they contain a lot of "header" codes for USB handler and the likes.
So far I've seen HID, CDC, MIDI and... a few others in there
Jack of all trade - Master of some... I hope...
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #32 on: April 21, 2017, 02:32:09 pm »
I just have PIC16F1455 on breadboards.

Depends on what you want.

You can use Microchip USB stack and you can get it up and running within few hours.

Or, if you want to study how USB works, you can read USB 2.0 specs, the PIC datasheet and write your own USB routines. This is, for sure, much longer road.
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #33 on: April 23, 2017, 06:07:37 pm »
Does anyone know how much FLASH space the free STM USB stack code takes up in an STM32F102? For some reason they don't seem to think it's worth mentioning in the specs or the user manual. I could try building it of course but finding the code to download on ST's website could take a while.

I sometimes wonder if ST's website administrators are fans of the horror film 'The Cube' where a group of people wake up in a maze of cube rooms which constantly rearrange themselves, presenting a fiendish challenge to the victims trying to work out how to escape...

[EDIT]:  I asked about code size as I have some STM32F102C4s which only have 16K bytes - it doesn't seem a lot to include a stack. However I see that there are other devices with USB periperals, including the PIC18F13K50 and ATmega8U2, which only have 8K of FLASH and 512 bytes of RAM. How much of that will be left after a USB stack?
« Last Edit: April 23, 2017, 08:46:25 pm by splin »
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #34 on: April 23, 2017, 10:51:54 pm »
FWIW, as I happen to have Atmel visual studio 7 installed I tried building example 41 'an echo application by USB CDC interface' for a SAMD11 (16k Cortex M0+). It uses 11,700 bytes of code (71%) and 2792 bytes of RAM. (I can't for the life of me work out how to change compiler options to optimize for space - the 'help' doesn't seem to help; perhaps I'm too old for this... )

That's quite a lot, but I've no idea if this can be trimmed down significantly.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #35 on: April 23, 2017, 11:23:57 pm »
However I see that there are other devices with USB periperals, including the PIC18F13K50 and ATmega8U2, which only have 8K of FLASH and 512 bytes of RAM. How much of that will be left after a USB stack?

It's hard to calculate precisely because it is spread around, but my code for PIC16F1454 is about 700 commands (give or take 100), which is approximately 10% of the available code memory.
 

Offline krho

  • Regular Contributor
  • *
  • Posts: 222
  • Country: si
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #36 on: April 24, 2017, 07:35:10 am »
Does anyone know how much FLASH space the free STM USB stack code takes up in an STM32F102? For some reason they don't seem to think it's worth mentioning in the specs or the user manual. I could try building it of course but finding the code to download on ST's website could take a while.

I have a test project here for stm32f413 with MSD HAL stack and Os compiled project is 20640b Og is approximately 2000b more. There is a lot more code in there than just the USB MSD but as I've commented out the init code for that I trust the linker that it has thrown that out.
 

Online hans

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nl
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #37 on: April 24, 2017, 09:13:55 am »
Does anyone know how much FLASH space the free STM USB stack code takes up in an STM32F102? For some reason they don't seem to think it's worth mentioning in the specs or the user manual. I could try building it of course but finding the code to download on ST's website could take a while.

I sometimes wonder if ST's website administrators are fans of the horror film 'The Cube' where a group of people wake up in a maze of cube rooms which constantly rearrange themselves, presenting a fiendish challenge to the victims trying to work out how to escape...

[EDIT]:  I asked about code size as I have some STM32F102C4s which only have 16K bytes - it doesn't seem a lot to include a stack. However I see that there are other devices with USB periperals, including the PIC18F13K50 and ATmega8U2, which only have 8K of FLASH and 512 bytes of RAM. How much of that will be left after a USB stack?

For STM32F411 (with GCC set to compile for cortex m3 ISA), my USB soundcard project compiles to around 12.5k of code with space optimisations on. On -Og it is 14.5K.

On -Os, core USB modules is around 6K, USB audio device ~1K, startup + CMSIS around 2K, and application (with some floating point) 3.5K.

So 16K will be a squeeze. Perhaps if you can keep the USB driver code at -Os during development it is doable, but sounds to me like you want to buy 32K part for a development unit, and use the 16K on units you don't need debugging for.
 

Offline aandrew

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #38 on: April 24, 2017, 05:08:38 pm »
Even the 8051 core is good for the right purposes.  Sure, it has been around a long time, but there are good reasons why it's still in use.

Yeah, it's patent-free, a tiny core (for embedding into ASICs) and there is an enormous amount of old code out there that you can lift for your own projects. :-)
 

Offline aandrew

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #39 on: April 24, 2017, 05:11:46 pm »
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...

Dana is a well known and friendly admin from the Cypress PSoC forums. He (I think Dana is a he, please accept my apologies if I got this wrong) really believes in the product and his support is really quite good. I don't fault him on promoting the PSoC, although I do agree that some kind of disclaimer ("I might be biased, I work for Cypress") would be good.

Having said all that, I've made my feelings about the PSoCs available in other threads in this forum so I won't bother repeating it again here.
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #40 on: April 24, 2017, 09:43:31 pm »
It's hard to calculate precisely because it is spread around, but my code for PIC16F1454 is about 700 commands (give or take 100), which is approximately 10% of the available code memory.

That's impressive at just over 1Kbytes. Is it written in assembler? Someone on an MSP forum has reduced a TI MSP430 CD USB stack (in 'C') to 1.5K.

I have a test project here for stm32f413 with MSD HAL stack and Os compiled project is 20640b Og is approximately 2000b more. There is a lot more code in there than just the USB MSD but as I've commented out the init code for that I trust the linker that it has thrown that out.

Not so impressive! But I guess we aren't exactly comparing like for like.

For STM32F411 (with GCC set to compile for cortex m3 ISA), my USB soundcard project compiles to around 12.5k of code with space optimisations on. On -Og it is 14.5K.

On -Os, core USB modules is around 6K, USB audio device ~1K, startup + CMSIS around 2K, and application (with some floating point) 3.5K.

So 16K will be a squeeze. Perhaps if you can keep the USB driver code at -Os during development it is doable, but sounds to me like you want to buy 32K part for a development unit, and use the 16K on units you don't need debugging for.

14.5K is still an awful lot though compared to 1.5K. Again I guess it is a full featured implementation with robust error checking and handling etc. I had a closer look at the ATMEL SAMD11 example I compiled and the actual USB code is around 8000 bytes.

I also found an excellent ATMEL document, AVR4920 'ASF - USB Device Stack - Compliance and Performance Figures', which provides comprehensive performance information on their USB stack. It shows (see attached) code size of 6K bytes for a full speed CDC device on an ATxmega or an AT32UC3. I wish all manufacturers would supply similar information for their embedded firmware products.

I know Cortex code size can be a bit bigger than for some 8 or 16 bit processors but I'd like to think that 2 or 3K should be possible if 1 to 1.5K has been achieved on PICs and MSP430s.

And then there is the issue of USB id's. I believe that Microchip allow you to use one of theirs in your own PIC based USB product but do any others? ST? I know there are ways around having to pay $2k to get an official set of ids, but none of them are exactly ideal if you want to sell a product.

Apologies to the original poster if I have hijacked your thread, but you did post about MCUs with USB.
 

Online Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #41 on: April 25, 2017, 12:08:19 am »
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...

Dana is a well known and friendly admin from the Cypress PSoC forums

Wow, so It was a paid (employee on the clock) post after all :o
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #42 on: April 25, 2017, 01:59:22 am »
That's impressive at just over 1Kbytes. Is it written in assembler? Someone on an MSP forum has reduced a TI MSP430 CD USB stack (in 'C') to 1.5K.

Yes, it is in assembler. But it wouldn't be much bigger with C. Most of the stuff is done by the PIC hardware. The USB code only needs to initiate transfers and parse requests on EP0. The biggest job is to serve descriptors during enumeration. It is HID, but CDC should be similar in size.

 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #43 on: April 25, 2017, 03:47:16 am »
It's hard to calculate precisely because it is spread around, but my code for PIC16F1454 is about 700 commands (give or take 100), which is approximately 10% of the available code memory.

That's impressive at just over 1Kbytes. Is it written in assembler? Someone on an MSP forum has reduced a TI MSP430 CD USB stack (in 'C') to 1.5K.

I have a test project here for stm32f413 with MSD HAL stack and Os compiled project is 20640b Og is approximately 2000b more. There is a lot more code in there than just the USB MSD but as I've commented out the init code for that I trust the linker that it has thrown that out.

Not so impressive! But I guess we aren't exactly comparing like for like.

For STM32F411 (with GCC set to compile for cortex m3 ISA), my USB soundcard project compiles to around 12.5k of code with space optimisations on. On -Og it is 14.5K.

On -Os, core USB modules is around 6K, USB audio device ~1K, startup + CMSIS around 2K, and application (with some floating point) 3.5K.

So 16K will be a squeeze. Perhaps if you can keep the USB driver code at -Os during development it is doable, but sounds to me like you want to buy 32K part for a development unit, and use the 16K on units you don't need debugging for.

14.5K is still an awful lot though compared to 1.5K. Again I guess it is a full featured implementation with robust error checking and handling etc. I had a closer look at the ATMEL SAMD11 example I compiled and the actual USB code is around 8000 bytes.

I also found an excellent ATMEL document, AVR4920 'ASF - USB Device Stack - Compliance and Performance Figures', which provides comprehensive performance information on their USB stack. It shows (see attached) code size of 6K bytes for a full speed CDC device on an ATxmega or an AT32UC3. I wish all manufacturers would supply similar information for their embedded firmware products.

I know Cortex code size can be a bit bigger than for some 8 or 16 bit processors but I'd like to think that 2 or 3K should be possible if 1 to 1.5K has been achieved on PICs and MSP430s.

And then there is the issue of USB id's. I believe that Microchip allow you to use one of theirs in your own PIC based USB product but do any others? ST? I know there are ways around having to pay $2k to get an official set of ids, but none of them are exactly ideal if you want to sell a product.

Apologies to the original poster if I have hijacked your thread, but you did post about MCUs with USB.

Will compiling with Cortex-M4F hard float help?

And can I use USB without ASF or HAL?
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #44 on: April 25, 2017, 04:53:46 pm »
Will compiling with Cortex-M4F hard float help?

I think the likelyhood that a USB stack uses any floating point is next to zero, so no. It is possible to take advantage of the larger resister set in the floating point unit in some circumstances but I don't know if the usual compilers can do this.

Quote
And can I use USB without ASF or HAL?

Of course you can write your own stack but that would be a lot of effort. I believe there is at least one open source USB stack project but I don't know anything about its status.

If you search around you should be able to find the source code for the USBASP atmel AVR programmer - I believe that implements USB on an atmega8 device that doesn't even have a USB peripheral. I don't think it is fully conformant with the USB specs, but it works well enough for its purpose.
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1138
  • Country: fi
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #45 on: April 25, 2017, 09:22:16 pm »
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...

Dana is a well known and friendly admin from the Cypress PSoC forums

Wow, so It was a paid (employee on the clock) post after all :o

you're jumping to conclusions imo and also, why is that relevant if the post was actually contributing to the OPs question (asking for mcu kits to play around with)?
 
The following users thanked this post: TheDane

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #46 on: April 25, 2017, 10:18:34 pm »
@technix

Quote
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...

I am the poster. I have used UPs since 72 and in recent years got tired of
doing designs with lots of analog crap around them. So I settled on PSOC
as the goto for most, not ALL designs. Its not the answer all, simply a very
good solution for many designs. With ARM M0 or M3 core plus all the other
stuff, plus the FPGA like fabric, its a home run in my mind.

Yes, I have a standard post, and do use copy and paste.



Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #47 on: April 25, 2017, 10:22:21 pm »
I am very suspicious why there are preformatted posts about Cypress PSoC everywhere. It seem to me that someone is copy/pasting things around in a lot of MCU-centric posts. Hmm...

Dana is a well known and friendly admin from the Cypress PSoC forums

Wow, so It was a paid (employee on the clock) post after all :o

you're jumping to conclusions imo and also, why is that relevant if the post was actually contributing to the OPs question (asking for mcu kits to play around with)?

its called disclosure. There is a difference between "this is the best chip I ever worked with" and "my employer makes the best chips"


I am the poster. I have used ....
Yes, I have a standard post, and do use copy and paste.

cool story, so are you employed or in any monetary contract with Cypress?
if answer is yes did it ever cross your mind to mention this in your copypasta?
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #48 on: April 25, 2017, 10:31:08 pm »
With ARM M0 or M3 core plus all the other stuff, plus the FPGA like fabric, its a home run in my mind.

or Zynq - https://www.xilinx.com/products/silicon-devices/soc/zynq-7000.html

Hardly can get anything better.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for kits to play around with, got knee deep in MCU wars
« Reply #49 on: April 26, 2017, 01:32:39 am »
With ARM M0 or M3 core plus all the other stuff, plus the FPGA like fabric, its a home run in my mind.

or Zynq - https://www.xilinx.com/products/silicon-devices/soc/zynq-7000.html

Hardly can get anything better.
Zynq is a bit too complicated for some embedded projects as it 1) does not support any easily hand solderable package, and 2) runs full Linux which is not necessary in most times.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf