Suspect Devices Presents: Cooking with Maple Bacon
This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
An introduction to the Maple IDE and a comparison of it to the Arduino and Wiring Platforms.
An introduction to using libmaple from the command line and integrating it into an ide
Hardware Hello World.
Software Hello World (serial).
A more complicated example which will serve the following discussion
C(++) in an embedded environment
Datatypes
Structures,arrays,and enums
Scope, constants, and macros
C++ and Classes
Hardware interaction
Basic IO, Analog to Digital
Serial Ports (usb, usart, spi, twi)
External Interrupts
Timers
PWM
What to Bring:
A laptop and a standard usb a-b cable.
> Suspect Devices Presents: Cooking with Maple Bacon
> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> An introduction to the Maple IDE and a comparison of it to the Arduino and Wiring Platforms.
> An introduction to using libmaple from the command line and integrating it into an ide
> Hardware Hello World.
> Software Hello World (serial).
> A more complicated example which will serve the following discussion
> C(++) in an embedded environment
> Datatypes
> Structures,arrays,and enums
> Scope, constants, and macros
> C++ and Classes
> Hardware interaction
> Basic IO, Analog to Digital
> Serial Ports (usb, usart, spi, twi)
> External Interrupts
> Timers
> PWM
On Mon, Aug 20, 2012 at 12:38 PM, Joel <cincoden...@gmail.com> wrote:
> For those of you like me who don't closely read subject lines: the
> cost of the workshop (which includes the ~$35 Maple Bacon hardware) is
> $40.
> On Mon, Aug 20, 2012 at 11:35 AM, D Delmar Davis
> <art...@suspectdevices.com> wrote:
> > Suspect Devices Presents: Cooking with Maple Bacon
> > This saturday we will introduce our new hardware the Maple Bacon in a
> workshop focusing on programming.
> > In this workshop we will introduce the Leaflabs Maple platform using our
> own varient of the maple mini, the "Maple Bacon". This will be a software
> only (hardware is included, no soldering required) class and it will focus
> on programming.
> > An introduction to the Maple IDE and a comparison of it to the Arduino
> and Wiring Platforms.
> > An introduction to using libmaple from the command line and integrating
> it into an ide
> > Hardware Hello World.
> > Software Hello World (serial).
> > A more complicated example which will serve the following discussion
> > C(++) in an embedded environment
> > Datatypes
> > Structures,arrays,and enums
> > Scope, constants, and macros
> > C++ and Classes
> > Hardware interaction
> > Basic IO, Analog to Digital
> > Serial Ports (usb, usart, spi, twi)
> > External Interrupts
> > Timers
> > PWM
On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
> Suspect Devices Presents: Cooking with Maple Bacon
> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
Cool! I love ARM.
That said, what's the big reasons someone would want to move from AVR to
(small) ARM? No *nix, but is there networking? Cool video/sound features?
Advanced peripheral connectivity? Something cool we can do with all that
extra CPU power?
> On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
>> Suspect Devices Presents: Cooking with Maple Bacon
>> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
>> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> Cool! I love ARM.
> That said, what's the big reasons someone would want to move from AVR to
> (small) ARM? No *nix, but is there networking? Cool video/sound features?
> Advanced peripheral connectivity? Something cool we can do with all that
> extra CPU power?
> On Aug 20, 2012, at 1:19 PM, Aaron Burt <aa...@bavariati.org> wrote:
> > On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
> >> Suspect Devices Presents: Cooking with Maple Bacon
> >> This saturday we will introduce our new hardware the Maple Bacon in a
> workshop focusing on programming.
> >> In this workshop we will introduce the Leaflabs Maple platform using
> our own varient of the maple mini, the "Maple Bacon". This will be a
> software only (hardware is included, no soldering required) class and it
> will focus on programming.
> > Cool! I love ARM.
> > That said, what's the big reasons someone would want to move from AVR to
> > (small) ARM? No *nix, but is there networking? Cool video/sound
> features?
> > Advanced peripheral connectivity? Something cool we can do with all that
> > extra CPU power?
On Mon, Aug 20, 2012 at 1:22 PM, Aaron Eiche <aaron.ei...@gmail.com> wrote:
> Is the ARM on the Maple Bacon 32bits?
> On Mon, Aug 20, 2012 at 1:20 PM, Jerry Biehler <jerry.bieh...@gmail.com>
> wrote:
>> You can blink LEDs soooo much faster.
>> -Jerry
>> On Aug 20, 2012, at 1:19 PM, Aaron Burt <aa...@bavariati.org> wrote:
>> > On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
>> >> Suspect Devices Presents: Cooking with Maple Bacon
>> >> This saturday we will introduce our new hardware the Maple Bacon in a
>> >> workshop focusing on programming.
>> >> In this workshop we will introduce the Leaflabs Maple platform using
>> >> our own varient of the maple mini, the "Maple Bacon". This will be a
>> >> software only (hardware is included, no soldering required) class and it
>> >> will focus on programming.
>> > Cool! I love ARM.
>> > That said, what's the big reasons someone would want to move from AVR to
>> > (small) ARM? No *nix, but is there networking? Cool video/sound
>> > features?
>> > Advanced peripheral connectivity? Something cool we can do with all
>> > that
>> > extra CPU power?
.... I am told that at some time in the future there will be audio.....
My reasons for introducing this to dorkbot is to try to bridge the gap between the current group of technically savvy arm users and people who would otherwise be stuck with the Arduino. Also note that I am not alone in moving to arm (see the Arduino DUE)
The arm in the maple is much less expensive and more approachable than either the DUE or the next generation Maple board.
> On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
>> Suspect Devices Presents: Cooking with Maple Bacon
>> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
>> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> Cool! I love ARM.
> That said, what's the big reasons someone would want to move from AVR to
> (small) ARM? No *nix, but is there networking? Cool video/sound features?
> Advanced peripheral connectivity? Something cool we can do with all that
> extra CPU power?
> .... I am told that at some time in the future there will be audio.....
> My reasons for introducing this to dorkbot is to try to bridge the gap
> between the current group of technically savvy arm users and people who
> would otherwise be stuck with the Arduino. Also note that I am not alone in
> moving to arm (see the Arduino DUE)
> The arm in the maple is much less expensive and more approachable than
> either the DUE or the next generation Maple board.
> Don
> On Aug 20, 2012, at 1:19 PM, Aaron Burt wrote:
> > On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
> >> Suspect Devices Presents: Cooking with Maple Bacon
> >> This saturday we will introduce our new hardware the Maple Bacon in a
> workshop focusing on programming.
> >> In this workshop we will introduce the Leaflabs Maple platform using
> our own varient of the maple mini, the "Maple Bacon". This will be a
> software only (hardware is included, no soldering required) class and it
> will focus on programming.
> > Cool! I love ARM.
> > That said, what's the big reasons someone would want to move from AVR to
> > (small) ARM? No *nix, but is there networking? Cool video/sound
> features?
> > Advanced peripheral connectivity? Something cool we can do with all that
> > extra CPU power?
I have two projects in the pipeline but they will be slow since I am relatively new to writing C and Assembly (I'm a Ruby programmer by day). 1) I am working on porting the Arduino TVout library. I will post source code once I have a handle on how the timers work.
2) I am working on another board design that will have MIDI and audio out built in. However, to do midi yourself the hardware is very simple -- pick up a perfboard and make a midi circuit, then plug it into the Maple Bacon.
Since this is still an infant compared to the work done for Arduino, it will probably lag behind a bit. But it will get there!
> On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
>> Suspect Devices Presents: Cooking with Maple Bacon
>> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
>> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> Cool! I love ARM.
> That said, what's the big reasons someone would want to move from AVR to
> (small) ARM? No *nix, but is there networking? Cool video/sound features?
> Advanced peripheral connectivity? Something cool we can do with all that
> extra CPU power?
> .... I am told that at some time in the future there will be audio.....
> My reasons for introducing this to dorkbot is to try to bridge the gap between the current group of technically savvy arm users and people who would otherwise be stuck with the Arduino. Also note that I am not alone in moving to arm (see the Arduino DUE)
> The arm in the maple is much less expensive and more approachable than either the DUE or the next generation Maple board.
> Don
> On Aug 20, 2012, at 1:19 PM, Aaron Burt wrote:
> > On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
> >> Suspect Devices Presents: Cooking with Maple Bacon
> >> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
> >> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> > Cool! I love ARM.
> > That said, what's the big reasons someone would want to move from AVR to
> > (small) ARM? No *nix, but is there networking? Cool video/sound features?
> > Advanced peripheral connectivity? Something cool we can do with all that
> > extra CPU power?
One of the things that I have found when working with the arduino code base is how much cruft has collected. Porting to a different architecture really highlights how much cleanup there is to be done.
Which is a good thing.
On Aug 20, 2012, at 2:15 PM, Cameron Adamez wrote:
> I have two projects in the pipeline but they will be slow since I am relatively new to writing C and Assembly (I'm a Ruby programmer by day). > 1) I am working on porting the Arduino TVout library. I will post source code once I have a handle on how the timers work.
> 2) I am working on another board design that will have MIDI and audio out built in. However, to do midi yourself the hardware is very simple -- pick up a perfboard and make a midi circuit, then plug it into the Maple Bacon.
> Since this is still an infant compared to the work done for Arduino, it will probably lag behind a bit. But it will get there!
> Cameron
> On Aug 20, 2012, at 1:19 PM, Aaron Burt wrote:
>> On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
>>> Suspect Devices Presents: Cooking with Maple Bacon
>>> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
>>> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
>> Cool! I love ARM.
>> That said, what's the big reasons someone would want to move from AVR to
>> (small) ARM? No *nix, but is there networking? Cool video/sound features?
>> Advanced peripheral connectivity? Something cool we can do with all that
>> extra CPU power?
> Would taking this class give us a headstart/background enough to program one of Scott's nametags?
It would help somewhat but there are also some differences between the boards. The main thing you would learn about which would be similar would be using the programming toolchain (and it sounds like he will be covering some common embedded C programming topics also). But the libraries used are different. Don is using libmaple which has a Wiring/Arduino flavor while I am using a library from microbuilder.eu. Still, learning some C programming and getting a toolchain set upfor any Cortex M3 chip would have some carry over.
-Scott
> .... I am told that at some time in the future there will be audio.....
> My reasons for introducing this to dorkbot is to try to bridge the gap between the current group of technically savvy arm users and people who would otherwise be stuck with the Arduino. Also note that I am not alone in moving to arm (see the Arduino DUE)
> The arm in the maple is much less expensive and more approachable than either the DUE or the next generation Maple board.
> Don
> On Aug 20, 2012, at 1:19 PM, Aaron Burt wrote:
> > On Mon, Aug 20, 2012 at 11:35:04AM -0700, D Delmar Davis wrote:
> >> Suspect Devices Presents: Cooking with Maple Bacon
> >> This saturday we will introduce our new hardware the Maple Bacon in a workshop focusing on programming.
> >> In this workshop we will introduce the Leaflabs Maple platform using our own varient of the maple mini, the "Maple Bacon". This will be a software only (hardware is included, no soldering required) class and it will focus on programming.
> > Cool! I love ARM.
> > That said, what's the big reasons someone would want to move from AVR to
> > (small) ARM? No *nix, but is there networking? Cool video/sound features?
> > Advanced peripheral connectivity? Something cool we can do with all that
> > extra CPU power?
Maple native will probably support i2s but its a big and expensive processor. The Ret6 had i2s hardware but no native library support and the ret6 is not guaranteed to have future libmaple support. Most of the stm32 peripherals have dma support. For cheap with decent i2s you might look at the nuc12x series of chips or as jared boone.
....
On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>> .... I am told that at some time in the future there will be audio.....
The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
circuits for making a 24-bit USB sound card using a PCM3060. My
project uses the $7 48-pin 8051 version of the PSoC, but the code is
the same for the M3.
<art...@suspectdevices.com> wrote:
> Maple native will probably support i2s but its a big and expensive processor. The Ret6 had i2s hardware but no native library support and the ret6 is not guaranteed to have future libmaple support. Most of the stm32 peripherals have dma support. For cheap with decent i2s you might look at the nuc12x series of chips or as jared boone.
> ....
> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>> .... I am told that at some time in the future there will be audio.....
Wow, I didn't know Cypress had ARM *and* 20 bit analog.... crazy! Too bad those analog bits aren't at audio bandwidth, but the chips look like they have a lot of nice stuff.
I've used the Nuvoton parts. In fact, I have one on a board right here, which you'll probably see in several weeks. Nuvoton's documentation leaves quite a bit to be desired. Maybe the Chinese version is better?
As I recall, Don, you built some dev boards with Nuvoton parts quite a long time ago, maybe over a year now? What ever happened with those?
> The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
> circuits for making a 24-bit USB sound card using a PCM3060. My
> project uses the $7 48-pin 8051 version of the PSoC, but the code is
> the same for the M3.
> On Mon, Aug 20, 2012 at 4:26 PM, D Delmar Davis
> <art...@suspectdevices.com> wrote:
>> Maple native will probably support i2s but its a big and expensive processor. The Ret6 had i2s hardware but no native library support and the ret6 is not guaranteed to have future libmaple support. Most of the stm32 peripherals have dma support. For cheap with decent i2s you might look at the nuc12x series of chips or as jared boone.
>> ....
>> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>>> .... I am told that at some time in the future there will be audio.....
> As I recall, Don, you built some dev boards with Nuvoton parts quite a long time ago, maybe over a year now? What ever happened with those?
Been well over 2 years now.
Not a lot of open source or cross platform support let alone community.(on top of the issues you mentioned. ) And as you are clearly pointing out, I am not a super genius capable of scratch building the universe. I was to stupid to understand the stuff that Jared was doing and so I spent several months in a vm and built a few projects in the windows based commercial compiler but got frustrated and moved on to less difficult tasks.
Good bang for the buck though.
On Aug 20, 2012, at 4:59 PM, Paul Stoffregen wrote:
> On 08/20/2012 04:32 PM, David Turnbull wrote:
>> The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
>> circuits for making a 24-bit USB sound card using a PCM3060. My
>> project uses the $7 48-pin 8051 version of the PSoC, but the code is
>> the same for the M3.
>> On Mon, Aug 20, 2012 at 4:26 PM, D Delmar Davis
>> <art...@suspectdevices.com> wrote:
>>> Maple native will probably support i2s but its a big and expensive processor. The Ret6 had i2s hardware but no native library support and the ret6 is not guaranteed to have future libmaple support. Most of the stm32 peripherals have dma support. For cheap with decent i2s you might look at the nuc12x series of chips or as jared boone.
>>> ....
>>> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>>>> .... I am told that at some time in the future there will be audio.....
For what it's worth, Nuvoton's Chinese documentation is probably better for
more obscure stuff. We've asked Nuvoton a few questions on older devices
that required the US guys to have something translated from a Chinese
document, but for the NUC1xx series, which is probably what you're talking
about, all of the documentation seems to be the same in Chinese as in
English.
Also: the Nuvoton peripheral libraries aren't worth much, and a lot of the
peripherals don't seem as well thought out or as configurable as those in
other vendors' Cortex devices. That said, we've used several parts from
them, the pricing can't be beat (for large volumes), and we have mostly
been able to get them working the way we want :)
There's a Taiwanese university (Wuhan University of Technology) that's
partnered with some IC companies to develop an open-source RTOS for M3/M0
microcontrollers. They support Nuvoton, Atmel, NXP, TI, Holtek, etc. Has
anybody checked it out?
On Mon, Aug 20, 2012 at 4:59 PM, Paul Stoffregen <p...@pjrc.com> wrote:
> Wow, I didn't know Cypress had ARM *and* 20 bit analog.... crazy! Too bad
> those analog bits aren't at audio bandwidth, but the chips look like they
> have a lot of nice stuff.
> I've used the Nuvoton parts. In fact, I have one on a board right here,
> which you'll probably see in several weeks. Nuvoton's documentation leaves
> quite a bit to be desired. Maybe the Chinese version is better?
> As I recall, Don, you built some dev boards with Nuvoton parts quite a
> long time ago, maybe over a year now? What ever happened with those?
> On 08/20/2012 04:32 PM, David Turnbull wrote:
>> The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
>> circuits for making a 24-bit USB sound card using a PCM3060. My
>> project uses the $7 48-pin 8051 version of the PSoC, but the code is
>> the same for the M3.
>> On Mon, Aug 20, 2012 at 4:26 PM, D Delmar Davis
>> <art...@suspectdevices.com> wrote:
>>> Maple native will probably support i2s but its a big and expensive
>>> processor. The Ret6 had i2s hardware but no native library support and the
>>> ret6 is not guaranteed to have future libmaple support. Most of the stm32
>>> peripherals have dma support. For cheap with decent i2s you might look at
>>> the nuc12x series of chips or as jared boone.
>>> ....
>>> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>> .... I am told that at some time in the future there will be audio.....
For Nuvoton, I've ended up going to the ARM Ltd documentation. It's amazing how much of documentation there is, yet how little of it actually describes how to actually use anything. Everything seems to be just raw documentation for each little module. No examples, no explanations, just raw facts.
Unlike AVR where there's a pretty simple ISP programming interface, you pretty much have to build a debug system using ARM's very complex protocols, take control of the processor core, and then to program the flash you need to load and execute in RAM your own code (plus the data you want flashed) which does the work using the chip's in-application flash programming interface.
Compared to the convenient hardware interfaces and/or bootloaders that are so common on 8 bit chips, it's a pretty incredible hurdle to building any workable tools. Of course, many of the ARM chips have nice bootloaders in ROM, but not Nuvoton!
>> As I recall, Don, you built some dev boards with Nuvoton parts quite >> a long time ago, maybe over a year now? What ever happened with those?
> Been well over 2 years now.
> Not a lot of open source or cross platform support let alone > community.(on top of the issues you mentioned. )
> And as you are clearly pointing out, I am not a super genius capable > of scratch building the universe. I was to stupid to understand the > stuff that Jared was doing and so I spent several months in a vm and > built a few projects in the windows based commercial compiler but got > frustrated and moved on to less difficult tasks.
> Good bang for the buck though.
> On Aug 20, 2012, at 4:59 PM, Paul Stoffregen wrote:
>> On 08/20/2012 04:32 PM, David Turnbull wrote:
>>> The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
>>> circuits for making a 24-bit USB sound card using a PCM3060. My
>>> project uses the $7 48-pin 8051 version of the PSoC, but the code is
>>> the same for the M3.
>>> On Mon, Aug 20, 2012 at 4:26 PM, D Delmar Davis
>>> <art...@suspectdevices.com <mailto:art...@suspectdevices.com>> wrote:
>>>> Maple native will probably support i2s but its a big and expensive >>>> processor. The Ret6 had i2s hardware but no native library support >>>> and the ret6 is not guaranteed to have future libmaple support. >>>> Most of the stm32 peripherals have dma support. For cheap with >>>> decent i2s you might look at the nuc12x series of chips or as jared >>>> boone.
>>>> ....
>>>> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>>>>> .... I am told that at some time in the future there will be >>>>>> audio.....
On Mon, Aug 20, 2012 at 4:59 PM, Paul Stoffregen <p...@pjrc.com> wrote:
> Wow, I didn't know Cypress had ARM *and* 20 bit analog.... crazy! Too bad
> those analog bits aren't at audio bandwidth, but the chips look like they
> have a lot of nice stuff.
> I've used the Nuvoton parts. In fact, I have one on a board right here,
> which you'll probably see in several weeks. Nuvoton's documentation leaves
> quite a bit to be desired. Maybe the Chinese version is better?
> As I recall, Don, you built some dev boards with Nuvoton parts quite a long
> time ago, maybe over a year now? What ever happened with those?
> On 08/20/2012 04:32 PM, David Turnbull wrote:
>> The PSoC 5 has a Cortex M3 and does I2S with DMA. I even have code and
>> circuits for making a 24-bit USB sound card using a PCM3060. My
>> project uses the $7 48-pin 8051 version of the PSoC, but the code is
>> the same for the M3.
>> On Mon, Aug 20, 2012 at 4:26 PM, D Delmar Davis
>> <art...@suspectdevices.com> wrote:
>>> Maple native will probably support i2s but its a big and expensive
>>> processor. The Ret6 had i2s hardware but no native library support and the
>>> ret6 is not guaranteed to have future libmaple support. Most of the stm32
>>> peripherals have dma support. For cheap with decent i2s you might look at
>>> the nuc12x series of chips or as jared boone.
>>> ....
>>> On Aug 20, 2012, at 3:46 PM, Paul Stoffregen wrote:
>>>>> .... I am told that at some time in the future there will be audio.....
It's pretty easy to find tools for SWD and JTAG. e.g. OpenOCD and the
1st party tools. All the ARM chips I've looked at have the silicon to
support this, even Nuvoton. Why are you writing custom bootloaders?
On Mon, Aug 20, 2012 at 7:22 PM, Paul Stoffregen <p...@pjrc.com> wrote:
> For Nuvoton, I've ended up going to the ARM Ltd documentation. It's amazing
> how much of documentation there is, yet how little of it actually describes
> how to actually use anything. Everything seems to be just raw documentation
> for each little module. No examples, no explanations, just raw facts.
> Unlike AVR where there's a pretty simple ISP programming interface, you
> pretty much have to build a debug system using ARM's very complex protocols,
> take control of the processor core, and then to program the flash you need
> to load and execute in RAM your own code (plus the data you want flashed)
> which does the work using the chip's in-application flash programming
> interface.
> Compared to the convenient hardware interfaces and/or bootloaders that are
> so common on 8 bit chips, it's a pretty incredible hurdle to building any
> workable tools. Of course, many of the ARM chips have nice bootloaders in
> ROM, but not Nuvoton!
In my limited experience (smallish - 256K - STM ARMS and 128K Nuvoton), I've found OpenOCD works well for the STMs and will talk to the Nuvoton: reset, start, examine registers, set bits, etc. What OpenOCD won't do for the Nuvoton is program the flash! For that, you have to write the programming code as Paul said. (It goes in OpenOCD, but you still have to write it.) I found the Nuvoton documentation to be woefully inadequate as a guide to programming the flash and gave up on it. The STMs worked just fine and OpenOCD was a good environment for developing them.
-jim
> It's pretty easy to find tools for SWD and JTAG. e.g. OpenOCD and the
> 1st party tools. All the ARM chips I've looked at have the silicon to
> support this, even Nuvoton. Why are you writing custom bootloaders?
> -david
> On Mon, Aug 20, 2012 at 7:22 PM, Paul Stoffregen<p...@pjrc.com> wrote:
>> For Nuvoton, I've ended up going to the ARM Ltd documentation. It's amazing
>> how much of documentation there is, yet how little of it actually describes
>> how to actually use anything. Everything seems to be just raw documentation
>> for each little module. No examples, no explanations, just raw facts.
>> Unlike AVR where there's a pretty simple ISP programming interface, you
>> pretty much have to build a debug system using ARM's very complex protocols,
>> take control of the processor core, and then to program the flash you need
>> to load and execute in RAM your own code (plus the data you want flashed)
>> which does the work using the chip's in-application flash programming
>> interface.
>> Compared to the convenient hardware interfaces and/or bootloaders that are
>> so common on 8 bit chips, it's a pretty incredible hurdle to building any
>> workable tools. Of course, many of the ARM chips have nice bootloaders in
>> ROM, but not Nuvoton!
> _______________________________________________
> dorkbotpdx-blabber mailing list
> dorkbotpdx-blab...@dorkbot.org
> http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com > Version: 2012.0.2197 / Virus Database: 2437/5212 - Release Date: 08/20/12
The thing I found most difficult about Nuvoton was getting the chip to reboot without connecting the reset line, using only SWDIO and SWDCLK.
Nuvoton's flash memory controller has a bit that's supposed to initiate a software reboot. At least in the one chip I've been using, I pretty much came to the conclusion it simply doesn't work. The system control block in the M0 core has a AIRCR register that is supposed to provide a software reset that's vendor neutral for all ARM cores. That also doesn't work on Nuvoton. I tried writing to them both via the debug port MEM-AP and by code running from RAM. I'm pretty sure it's an undocumented silicon bug. I tried the same on another ARM from a different vendor, and AIRCR works fine. Later I found another bit in Nuvton's own system control peripheral, in the IPRSTC1 register, which does actually work. So many hours lost......
> In my limited experience (smallish - 256K - STM ARMS and 128K > Nuvoton), I've found OpenOCD works well for the STMs and will talk to > the Nuvoton: reset, start, examine registers, set bits, etc. What > OpenOCD won't do for the Nuvoton is program the flash! For that, you > have to write the programming code as Paul said. (It goes in OpenOCD, > but you still have to write it.) I found the Nuvoton documentation to > be woefully inadequate as a guide to programming the flash and gave up > on it. The STMs worked just fine and OpenOCD was a good environment > for developing them.
> -jim
> On 8/20/2012 7:44 PM, David Turnbull wrote:
>> It's pretty easy to find tools for SWD and JTAG. e.g. OpenOCD and the
>> 1st party tools. All the ARM chips I've looked at have the silicon to
>> support this, even Nuvoton. Why are you writing custom bootloaders?
>> -david
>> On Mon, Aug 20, 2012 at 7:22 PM, Paul Stoffregen<p...@pjrc.com> wrote:
>>> For Nuvoton, I've ended up going to the ARM Ltd documentation. It's >>> amazing
>>> how much of documentation there is, yet how little of it actually >>> describes
>>> how to actually use anything. Everything seems to be just raw >>> documentation
>>> for each little module. No examples, no explanations, just raw facts.
>>> Unlike AVR where there's a pretty simple ISP programming interface, you
>>> pretty much have to build a debug system using ARM's very complex >>> protocols,
>>> take control of the processor core, and then to program the flash >>> you need
>>> to load and execute in RAM your own code (plus the data you want >>> flashed)
>>> which does the work using the chip's in-application flash programming
>>> interface.
>>> Compared to the convenient hardware interfaces and/or bootloaders >>> that are
>>> so common on 8 bit chips, it's a pretty incredible hurdle to >>> building any
>>> workable tools. Of course, many of the ARM chips have nice >>> bootloaders in
>>> ROM, but not Nuvoton!
>> _______________________________________________
>> dorkbotpdx-blabber mailing list
>> dorkbotpdx-blab...@dorkbot.org
>> http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com >> Version: 2012.0.2197 / Virus Database: 2437/5212 - Release Date: >> 08/20/12
On Tue, Aug 21, 2012 at 2:54 AM, Paul Stoffregen <p...@pjrc.com> wrote:
> The thing I found most difficult about Nuvoton was getting the chip to
> reboot without connecting the reset line, using only SWDIO and SWDCLK.
> Nuvoton's flash memory controller has a bit that's supposed to initiate a
> software reboot. At least in the one chip I've been using, I pretty much
> came to the conclusion it simply doesn't work. The system control block in
> the M0 core has a AIRCR register that is supposed to provide a software
> reset that's vendor neutral for all ARM cores. That also doesn't work on
> Nuvoton. I tried writing to them both via the debug port MEM-AP and by code
> running from RAM. I'm pretty sure it's an undocumented silicon bug. I
> tried the same on another ARM from a different vendor, and AIRCR works fine.
> Later I found another bit in Nuvton's own system control peripheral, in the
> IPRSTC1 register, which does actually work. So many hours lost......
> On 08/20/2012 09:48 PM, Jim Larson wrote:
>> In my limited experience (smallish - 256K - STM ARMS and 128K Nuvoton),
>> I've found OpenOCD works well for the STMs and will talk to the Nuvoton:
>> reset, start, examine registers, set bits, etc. What OpenOCD won't do for
>> the Nuvoton is program the flash! For that, you have to write the
>> programming code as Paul said. (It goes in OpenOCD, but you still have to
>> write it.) I found the Nuvoton documentation to be woefully inadequate as a
>> guide to programming the flash and gave up on it. The STMs worked just fine
>> and OpenOCD was a good environment for developing them.
>> -jim
>> On 8/20/2012 7:44 PM, David Turnbull wrote:
>>> It's pretty easy to find tools for SWD and JTAG. e.g. OpenOCD and the
>>> 1st party tools. All the ARM chips I've looked at have the silicon to
>>> support this, even Nuvoton. Why are you writing custom bootloaders?
>>> -david
>>> On Mon, Aug 20, 2012 at 7:22 PM, Paul Stoffregen<p...@pjrc.com> wrote:
>>>> For Nuvoton, I've ended up going to the ARM Ltd documentation. It's
>>>> amazing
>>>> how much of documentation there is, yet how little of it actually
>>>> describes
>>>> how to actually use anything. Everything seems to be just raw
>>>> documentation
>>>> for each little module. No examples, no explanations, just raw facts.
>>>> Unlike AVR where there's a pretty simple ISP programming interface, you
>>>> pretty much have to build a debug system using ARM's very complex
>>>> protocols,
>>>> take control of the processor core, and then to program the flash you
>>>> need
>>>> to load and execute in RAM your own code (plus the data you want
>>>> flashed)
>>>> which does the work using the chip's in-application flash programming
>>>> interface.
>>>> Compared to the convenient hardware interfaces and/or bootloaders that
>>>> are
>>>> so common on 8 bit chips, it's a pretty incredible hurdle to building
>>>> any
>>>> workable tools. Of course, many of the ARM chips have nice bootloaders
>>>> in
>>>> ROM, but not Nuvoton!