Close
0%
0%

Workshop: Squeezing Blood From A Stone

A tutorial on getting back memory and performance in your firmware for #SuperCon

Similar projects worth following
Workshop for first Hack A Day SuperCon.

Getting the most out of your processor through a basic introduction about how to reduce excessive memory and improve algorithms by expanding their tools of the firmware trade. We’ll cover how to read those often ignored compiler user’s guide, map files and listings, as well as profiling run time code techniques to target problem areas. To get the most of the workshop attendees should bring their laptop with Keil Lite IDE, a STM32L476 Discovery board and optionally a scope/logic analyzer/Saleae.

See below for more requirements.

Most recent requirements and information are now here in this blog article (this will always have the latest) .

Requirements for workshop are:

Squeezing Blood From a Stone V1.2 from Jen Costillo

  • 1 × ST32L476VG Discovery Board board used to facilitate labs

View project log

Enjoy this project?

Share

Discussions

K.C. Lee wrote 11/04/2015 at 04:36 point

Actually you can if you use the simulator or having the right debugger/ARM core that support trace.

http://www.keil.com/uvision/db_anl_pa.asp
http://www.keil.com/uvision/db_anl_profiler.asp

  Are you sure? yes | no

Rebelbot wrote 11/04/2015 at 05:24 point

That's true but it will cost you and sometimes you don't have the resources to afford that kind of luxury. I am focusing on teaching more about:

1. how to work with limited tools and features that are free and generally available across whatever IDE or toolchain your decide to work with,

2. Finding answers regardless toolchain you are working with,

3. techniques that are independent of the IDE/toolchain

But yes, I love it when things are built in but not all companies will let you do that and you don't always need that.

  Are you sure? yes | no

K.C. Lee wrote 11/04/2015 at 14:40 point

The simulator part is free and it does peripherals supposedly, so one could have done the learning for $0.

Also there are cheap development boards with licensed Segger 's JLINK. e.g. SiLab (even comes with licensed Keil compiler), Kinetis Freedom boards can be flashed with Segger firmware.  You'll need to have the right ARM core with the trace feature.

Once you have figure out how the *coding style* for writing efficient code (which shouldn't need to go outside of the 32K limits), then you can do without the expensive tools.

It is good to know the tools availability out there and not be a frog looking up from the bottom of a well. 

  Are you sure? yes | no

Nick Molo wrote 11/04/2015 at 04:21 point

Is there any specific rreason we are using keil? Say for like some built in code profiling feature? 

  Are you sure? yes | no

Rebelbot wrote 11/04/2015 at 05:33 point

Nope, not really. I'm not relying on some of those cool features, but instead the basics of how do that profiling yourself without the overhead. The goal was not to make anyone buy anything more than an eval board and a USB cable but come away knowing how do manage the same process themselves.

I actually oscillated between Keil and IAR limited version which are pretty bare bones  with limited 32k image size but I felt the Keil IDE was slightly easier for the uninitiated to grasp. The workshop is short and more focused on techniques than how to press F5 or "start debug."
Let me know if you have more questions.

  Are you sure? yes | no

Nick Molo wrote 11/04/2015 at 05:48 point

Good to know. If you get the code up and available before the conference I'll throw together a makefile (for my own sake really) but I'll share it in case anyone else wants to use it. 

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates