<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8756201887955423383</id><updated>2011-07-08T18:42:27.666+02:00</updated><category term='interface'/><category term='Python'/><category term='at91sam7s'/><category term='Arduino'/><category term='Microcomputers'/><category term='STM32'/><category term='ARM'/><category term='XML'/><category term='Cortex-A8'/><category term='Art'/><category term='MIDI'/><category term='device descriptor'/><category term='OpenOCD'/><category term='USB'/><title type='text'>Tools for Art and Microcomputers</title><subtitle type='html'>Some ideas about programming tools and techniques, microcomputers and free and open software than can be used when working with Art and Microcomputers</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8756201887955423383.post-1522922029381231479</id><published>2009-09-12T01:12:00.003+02:00</published><updated>2009-09-12T16:28:27.564+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STM32'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>Using a STM32 based board for Arduino Development</title><content type='html'>&lt;h2&gt;Exploring ways to enhance Arduino while still keeping the ease and experience.&lt;/h2&gt;This is work in progress, more details, updates and pictures coming soon. But the basic stuff works as described today.&lt;br /&gt;&lt;br /&gt;Using Arduino boards and the Arduino GUI is a simple and fast way to develop embedded applications. There are predefined functions for input and output, serial communications and timing, many example sketches and the user does not have to worry about low level initialisation, interrupt vectors and timer configurations. On the other hand, ATMega 168 chips have limited resources, it is an 8 bit chip and not very fast.&lt;br /&gt;Modern Cortex-M3 chips like the STM32 are fast, have much more RAM and flash and they have powerful and well documented debugging subsystems using JTAG tools, but starting to program these chips can be a huge step. &lt;br /&gt;&lt;br /&gt;So here is my project to use a slightly modified, but from the users point standard Arduino IDE, standard Arduino sketches and run them on a powerful 32 bit Cortex-M3 (STM32) chip. The process of writing sketches, uploading them and then running them is exactly the same as for ordinary Arduino development. It is just that the processor board we use is not an Arduino. And you can use it all for your old Arduino boards also.&lt;br /&gt;&lt;br /&gt;More complicated sketches that uses lowlevel access to the ATMega chip must be rewritten for this new platform. &lt;br /&gt;&lt;br /&gt;The components we need:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hardware.&lt;/li&gt;&lt;li&gt;Modified Arduino IDE.&lt;/li&gt;&lt;li&gt;Library code for this chip and board configuration.&lt;/li&gt;&lt;li&gt;Toolchain to compile and build code for a Cortex-M3 processor&lt;/li&gt;&lt;li&gt;An uplader that is used to program the chip.&lt;/li&gt;&lt;/ul&gt;The software setup has been developed and tested under Linux. &lt;br /&gt;&lt;h4&gt;Hardware&lt;/h4&gt;The board I use is an ET-STAMP-STM32, a chip carrier module that brings out all chip i/o lines but not much more. I bought it for $24.90 from Futurlec (&lt;a href="http://www.futurlec.com/ET-STM32_Stamp.shtml"&gt;ET STM32 Stamp&lt;/a&gt;). It is mounted on a breadboard together with a 3.3V power supply, a serial USB adapter, a LED and some extra stuff for experimentation lika a potentiometer connected to an analog input and a push button.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_DAT64DtWUFo/SquEEi_7fTI/AAAAAAAAAA8/t9ah7plaxxI/s1600-h/arduino_stm32.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_DAT64DtWUFo/SquEEi_7fTI/AAAAAAAAAA8/t9ah7plaxxI/s400/arduino_stm32.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The FTDI USB is only used to supply 5V to the small 3.3V regulator board. It can also be connected to UART2 or UART3.&lt;br /&gt;The board is at the moment running a sketch that read the analog voltage from the potentiometer and adjusts the LED blink frequency:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;volatile&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;unsigned&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;int&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; count=-1;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;int&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; ledPin = 44;  &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// STM32_P103 Board - PC12&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;int&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; dly;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;int&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; analogChn = 10;  &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// Analog channel 10 is PC0 = pin 32&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;void&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;&lt;b&gt;setup&lt;/b&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;pinMode&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(ledPin, &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #006699; font-size: x-small;"&gt;OUTPUT&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;);      &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// sets the digital pin as output }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;Serial&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;.&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;begin&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(115200);         &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// opens serial port, 31250bps (MIDI speed)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;Serial&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;.&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;write&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #006699; font-size: x-small;"&gt;"\n\n   ***   Hello from Arduino 32   ***\n"&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;void&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;&lt;b&gt;loop&lt;/b&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;int&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; k;&lt;br /&gt;&amp;nbsp;&amp;nbsp;count++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;dly&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;analogRead&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(10)/2+20;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;digitalWrite&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(ledPin, &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #006699; font-size: x-small;"&gt;HIGH&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;);   &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// sets the LED off&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;delay&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(dly);                  &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// waits for a second&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;digitalWrite&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(ledPin, &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #006699; font-size: x-small;"&gt;LOW&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;);    &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// sets the LED on&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;dly&amp;nbsp;=&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;analogRead&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(10)/2+20;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;delay&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(dly);                  &lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #7e7e7e; font-size: x-small;"&gt;// waits for a second  &lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;if&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt; (count%100 ==0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;Serial&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;.&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;print&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(count);    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;Serial&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;.&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #cc6600; font-size: x-small;"&gt;write&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: x-small;"&gt;(&lt;/span&gt;&lt;span style="background-color: #fff2cc; color: #006699; font-size: x-small;"&gt;"\n"&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background-color: #fff2cc;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: #fff2cc;"&gt;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;So you can see that the sketch is a totally standard Arduino sketch. &lt;br /&gt;&lt;h4&gt;Modified Arduino IDE.&lt;/h4&gt;The Arduino IDE is modified in order to be able to build code with the ARM toolchain. The modified files and some new files that are added can be found at &lt;a href="http://github.com/mlu/arduino-stm32/tree/master"&gt;http://github.com/mlu/arduino-stm32/tree/master&lt;/a&gt; . These files must be placed in the source tree for Arduino 0017, and then the IDE must be rebuilt.&lt;br /&gt;&lt;h4&gt;Library code for this chip and board configuration.&lt;/h4&gt;The special code for this chip and board are found under hardware/stm32 and to use this you just have to select the board "&lt;i&gt;STM32 Arduino32&lt;/i&gt;" in the Tools menu in the IDE.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Toolchain to compile and build code for a Cortex-M3 processor&lt;/h4&gt;I use the Codesourcery G++ Lite Edition for ARM, EABI version, that can be downloaded from the Codesourcery website (&lt;a href="http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite"&gt;Codesourcery G++ Lite&lt;/a&gt;&amp;nbsp;).&lt;br /&gt;Install this and make sure that the top bin directory containing "arm-none-eabi-gcc" and the rest of the cross compilation binaries are in the path.&lt;br /&gt;&lt;h4&gt;Uploader&lt;/h4&gt;I have written a small uploader, using similar command line arguments as avrdude, that uploads the compiled and linked sketches to the processor.&lt;br /&gt;The code and also a compiled binary that runs under Fedora 10 are included in the files at github.com/mlu/arduino-stm32.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Almost ready to rock&lt;/h3&gt;The first thing to notice is that the pin numberings are different&lt;br /&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;Arduino sketch&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Board&lt;/b&gt;&lt;br /&gt;digital pin number 0..15&amp;nbsp;&amp;nbsp;&amp;nbsp; pin PA0 .. PA15&lt;br /&gt;analog pin number 0..7 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pin PA0&amp;nbsp; .. PA7&lt;br /&gt;analog pin number 8,9 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pin PB0,PB1&lt;br /&gt;analog pin number 10..15&amp;nbsp;&amp;nbsp;&amp;nbsp; pin PC0&amp;nbsp; .. PC5 &lt;/blockquote&gt;Pins 9 and 10 (PA9 and PA10) are used by USART1 and are connected to the RS232 level shifter for the serial port and should not be used.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;We must also manually switch the board between bootloader mode and normal run mode with the blue switch, and also do all resets manually with the reset switch.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Testing Blink&lt;/h3&gt;Blink uses the LED on pin number 13, This corresponds to pin PA13 so we add a LED and a 220 ohm serial resistor to PA13. Connect a serial adapter to the board and select the corresponding serial port in the Arduino IDE.&lt;br /&gt;Load the Example/Digital/Blink sketch and select board type "STM32 Arduino 32". Set the board in bootloader mode by depressing the blue button, the green bootloader LED lights up, and reset the board. Now it should be possible to simply upload the sketch :), go back to normal run mode with the blue button and reboot with the reset button.&lt;br /&gt;&lt;br /&gt;Now this is new and quite untested code so many things could go wrong when trying to do this on a computer with a different setup.&lt;br /&gt;&lt;br /&gt;More to follow, especially with reader feedback&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756201887955423383-1522922029381231479?l=arttools.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/1522922029381231479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8756201887955423383&amp;postID=1522922029381231479' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/1522922029381231479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/1522922029381231479'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/2009/09/using-stm32-based-board-for-arduino.html' title='Using a STM32 based board for Arduino Development'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DAT64DtWUFo/SquEEi_7fTI/AAAAAAAAAA8/t9ah7plaxxI/s72-c/arduino_stm32.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756201887955423383.post-3936873300667701191</id><published>2009-09-05T16:09:00.034+02:00</published><updated>2009-09-06T23:18:14.057+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenOCD'/><category scheme='http://www.blogger.com/atom/ns#' term='Cortex-A8'/><title type='text'>Debugging on the Cortex-A8, System Components</title><content type='html'>&lt;h2&gt;Cortex-A8 for dummies, part 1&lt;/h2&gt;I have been working on the Cortex-A8 subsystem for OpenOCD for some time this summer. This is great fun, when there is enough time, but also takes a lot of work. It is a complicated system and the documentation is large, spread over several big TRM's and sometimes hard to grasp. So here comes the "Cortex-A8 Debugging for Dummies" version 0.0. This first post looks at the main components involved and the access methods. &lt;br /&gt;&lt;br /&gt;You can also take a look at OpenOCD for the BeagleBoard at&lt;br /&gt;&lt;a href="http://elinux.org/BeagleBoardOpenOCD"&gt;http://elinux.org/BeagleBoardOpenOCD&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The new members of the ARM family of processor cores, the Cortex-M3 and the Cortex-A8, share some features but in many fundamental ways they are not similar. They both support the Thumb2 instruction set and they both use the ARM Debug Interface v5 for debugging and direct access to the core debug units and the AHP and APB buses. Cortex-M3 processors also use the NVIC interrupt controller for handling peripheral interrupts. This makes debugging easier and interrupt handling more consistent when using processors from different suppliers. Cortex-A8 processor have implementation defined handling of external interrupts.&lt;br /&gt;&lt;br /&gt;Architecturally there are big differences. The Cortex-M3 uses the ARMv7M profile with a very simplified set of processor modes and a reduced set of shadow registers. Cortex-M3 can only run Thumb2 code. This is in contrast to the Cortex-A8 that can run ARM, Thumb and ThumbEE instructions, and where the architecture is a variant of the standard ARM architecture seen in ARM7, ARM9 and ARM11 cores.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;System Components&lt;br /&gt;&lt;/h3&gt;Here is a simplified picture of a Cortex-A8 system, based on the Texas Instrument OMAP3530 Applications Processor, used in the BeagleBoard. There are four main components involved in our picture of the system:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Debug Access Port, connects an external debugger through JTAG or SW, serial wire, to our system. The DAP can have one or several Access Ports, AP, that connects to different parts of the system.  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;MPU, Microprocessor Unit Subsystem. Here we find the processor core, core registers, system coprocessor CP15, Memory Management Unit, L1 and L2 Cache.&lt;/li&gt;&lt;li&gt;A Core Debug Unit that can pass data and instructions directly to the processor core, and also halt and resume the processor. This is connected to the AP through a local memory bus, an Advanced Peripheral Bus, APB.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;External high speed bus, this is the L3 bus and it is an implementation of the Advanced High Speed Bus, AHB,&amp;nbsp; specified by ARM. Peripheral components and memory are connected to this bus.&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Main Components for Core Debug System with one APB and one AHB MEMAP&lt;br /&gt;&lt;/h4&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_DAT64DtWUFo/SqQU43OovaI/AAAAAAAAAAs/ZbfK6ZiV2f8/s1600-h/cortex_a8_debug_components.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_DAT64DtWUFo/SqQU43OovaI/AAAAAAAAAAs/ZbfK6ZiV2f8/s400/cortex_a8_debug_components.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In this example we have two access ports, both of them access system resources by a local memory address space, so called memory mapped access ports or MEMAP. The access ports are marked with the type of bus it is connected to. The APB-AP is connected to the debug resources without going through the system AHB bus. Each MEMAP have a access port number to identify it in the DAP. For the OMAP3530 processor the AHB-AP is number 0 and the APB-AP is number 1.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;A debug program like OpenOCD connects through JTAG to the DAP, and all communications are passed through an access port into the system. When using OpenOCD we can select which access port to use with the command:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="background-color: #ffe599; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;dap apsel n&lt;/span&gt;&lt;/blockquote&gt;Here n is 0 or 1 for a system with two AP's. After selecting a MEMAP we can access the memory space of the AP with the memory display word, mdw, and memory write word, mww, commands: &lt;br /&gt;&lt;blockquote style="background-color: #ffe599; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;dap apsel 1&lt;br /&gt;&amp;gt;mdw 0x80000000&lt;br /&gt;&amp;gt;dap apsel 0&lt;br /&gt;&amp;gt;mdw 0x80000000&lt;br /&gt;&amp;gt;mww 0x80000000 0x12ab34cd&lt;br /&gt;&amp;gt;mdw 0x80000000&lt;/blockquote&gt;If there is no memory at the specified address or if the access is prohibited by the security manager a "Sticky Error" is generated by the AP and reported by OpenOCD. We can get more information about the type of resources a MEMAP is connected to by using the command&lt;br /&gt;&lt;blockquote&gt;&lt;span style="background-color: #ffe599; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;dap info n&lt;/span&gt;&lt;/blockquote&gt;This information is encoded by the AP in a so called ROM Table. The details of how to identify system resources from&amp;nbsp; a ROM Table will be explained in a later post.&lt;br /&gt;&lt;br /&gt;The APB AP, with MEMAP access port number 1, is reported as "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;MEMTYPE system memory not present. Dedicated debug bus.&lt;/span&gt;"This indicates that only CoreSight components and other debug resources identified in the ROMTABLE for this AP are accessible. Memory and memory mapped peripheral control registers are not available.&lt;br /&gt;&lt;br /&gt;The ADP v5 Debug Port is described in &lt;i&gt;&lt;a class="external text" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0031a/index.html" rel="nofollow" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0031a/index.html"&gt;ARM IHI 0031A&lt;/a&gt; (ARM Debug Interface v5).&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;AHB and APB buses are described in &lt;i&gt;&lt;a class="external text" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0011a/index.html" rel="nofollow" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0031a/index.html"&gt;ARM IHI 0011A&lt;/a&gt; (AMBA Specification Rev. 2.0).&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The Debug Unit, the debug registers, MPU  and the cache systems are described in &lt;i&gt;&lt;a class="external text" href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344h/DDI0344H_cortex_a8_r3p0_trm.pdf" rel="nofollow" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344h/DDI0344H_cortex_a8_r3p0_trm.pdf"&gt;ARM DDI 0344H&lt;/a&gt; (Cortex-A8 TRM).&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The system overview and relation between the components can also bee sen in &lt;a class="external text" href="http://www.ti.com/litv/pdf/spruf98b" rel="nofollow" title="http://www.ti.com/litv/pdf/spruf98b"&gt;OMAP35x Technical Reference Manual&lt;/a&gt; (spruf98b.pdf) Figure 1-1. Interconnect Overview.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Core and Memory Access&lt;br /&gt;&lt;/h3&gt;The core is accessed through the APB MEMAP using the communications registers in the debug unit DTRRX, DTRTX and ITR.&lt;br /&gt;&lt;br /&gt;Access to the full memory address range of the system can be done through the AHB  AP to the L3 bus and is controlled by the security and access restrictions that are active in the system. This access always uses physical memory addresses (PA). There is risk for cache coherency problems when accessing memory this way, for &lt;i&gt;volatile&lt;/i&gt; resources like I/O registers the problem should be less.  This access can be done while the MPU Core is running.&lt;br /&gt;&lt;br /&gt;When MMU is active all memory addresses in the core like PC, LR and data pointers are virtual addresses and must be translated to physical addresses before accessing them through the AHB AP.&lt;br /&gt;&lt;br /&gt;Another way to access memory and memory mapped resources from the debug port is through the MPU using LDR and STR instructions written to the ITR and data in the DCC registers, DTRRX and DTRTX. [Cortex_A8 TRM, sec 12.11.6]. This access will go through the Cache and Memory Management Units of the Cortex_A8 and thus use virtual addressing when this is activated.&lt;br /&gt;&lt;h4&gt;Strategies&lt;br /&gt;&lt;/h4&gt;For configuring systems at start up, such as setting memory controller parameters, clocks and PLL registers, memory access through the AHB access port is good. This should also work well for writing to flash memories.&lt;br /&gt;&lt;br /&gt;For debugging code running on the MPU, the APB and access through the MPU core probably should be used, since this method avoids problems with virtual to physical address translations and also helps avoid cache coherency problems.&lt;br /&gt;&lt;br /&gt;A debug system should implement both access methods and some method to choose which one to use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Acknowledgements&lt;/h2&gt;Many thanks to Dirk Behme for proof reading and helpful comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756201887955423383-3936873300667701191?l=arttools.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/3936873300667701191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8756201887955423383&amp;postID=3936873300667701191' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/3936873300667701191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/3936873300667701191'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/2009/09/debugging-on-cortex-a8-system.html' title='Debugging on the Cortex-A8, System Components'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DAT64DtWUFo/SqQU43OovaI/AAAAAAAAAAs/ZbfK6ZiV2f8/s72-c/cortex_a8_debug_components.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756201887955423383.post-4447547332639195885</id><published>2009-07-31T01:02:00.003+02:00</published><updated>2009-08-04T02:06:05.773+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MIDI'/><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='at91sam7s'/><category scheme='http://www.blogger.com/atom/ns#' term='interface'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><title type='text'>MIDI7S - a flexible USB - MIDI interface</title><content type='html'>&lt;h2&gt;MIDI7S - a flexible USB - MIDI interface&lt;/h2&gt;This page is work in progress and will be updated with more precise documentation when that is available.&lt;br /&gt;&lt;h3&gt;System Components&lt;br /&gt;&lt;/h3&gt;&lt;div id="ahfs" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 559.136px;" src="http://docs.google.com/File?id=dcxkd3wh_35gp9z9zwm_b" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Processor board&lt;/h4&gt;&lt;br /&gt;The AT91SAM7S64 processor has 3 uarts that can be used as MIDI ports and a USB interface. The Olimex SAM7-P64 board also has header for most uP pins, power supply and mmc card connector. This makes it a cheap and powerful platform for a USB MIDI system.&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;img id="eink" style="width: 540px; height: 375px;" src="http://docs.google.com/File?id=dcxkd3wh_30gjw8dbfx_b" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This processor is a bit old, but it is still a nice processor and I had this board and did not use for anything else. Today I would probably use something like a Olimex STM32-P103 board or design my own board for a STM32F103 processor.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;MIDI interface board&lt;/h4&gt;MIDI out is driven directly from the microprocessor uart tx pin. Only one 220Ohm resistor is used , there should be two according to reference implementations. When driving MIDI from a 3.3 V source 2x70 Ohm is probably the best, for a typical VF of 1.5V  and series resistance of 220 Ohms in the receiver this gives I=(3.3-1.5)/360 =  5mA. The short curcuit current, 47 mA is a little bit high but not exceptional.&lt;br /&gt;MIDI in uses 6N137 optoisolators&lt;br /&gt;&lt;br /&gt;MIDI 1 IN / OUT&lt;br /&gt;&lt;br /&gt;MIDI 2 IN / OUT&lt;br /&gt;&lt;br /&gt;Schematic (one channel):&lt;br /&gt;&lt;div id="i70f" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcxkd3wh_38frvgrtgq_b" height="444" width="551" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Board layout (one channel)&lt;br /&gt;&lt;div id="uod0" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcxkd3wh_39csv4rkdj_b" height="466" width="546" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The actual construction was built on a strip-board&lt;br /&gt;&lt;br /&gt;&lt;div id="et43" style="text-align: left;"&gt;&lt;img style="width: 648px; height: 352.11px;" src="http://docs.google.com/File?id=dcxkd3wh_37f6jhb5v8_b" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;DOG-ME Display board&lt;/h4&gt;This a 2x20 character LCD display using serial communications&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Communication Interfaces&lt;br /&gt;&lt;/h3&gt;&lt;h4&gt;USBMIDI&lt;/h4&gt;&lt;p&gt;The USBMIDI configuration uses two logical USB MIDI Cables connected to the physical MIDI ports&lt;/p&gt;&lt;p&gt;/* MIDI IN JACK 1 receives data from the USB interface Ep 1 */&lt;/p&gt;&lt;p&gt;/* MIDI IN JACK 2 receives data from the serial uartmidi[0] */&lt;br /&gt;/* MIDI OUT JACK 3 transmits data to the USB interface Ep 82 */&lt;br /&gt;/* MIDI OUT JACK 4 transmits data to the serial uartmidi[0] */&lt;br /&gt;/* MIDI OUT JACK 8 transmits data to the serial uartmidi[1] */&lt;br /&gt;&lt;br /&gt;The sending of USB MIDI data through MIDI OUT JACK 3 using USB IN endpoint Ep82 needs work for buffering and handling of many small write requests&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Serial MIDI&lt;/h4&gt;The serial MIDI interfaces are connected to USART0 and DEBUGUSART. USART1 is connected to a RS232 level shifter an can be used for "standard" serial communications.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Dog-ME Display interface (SPI 3.3V) &lt;/h4&gt;PA13    MOSI&lt;br /&gt;PA14    SPCK&lt;br /&gt;PA30    IRQ1/NPCS2 DOG_LCD_SELECT_PIN&lt;br /&gt;PA31    NPCS1/PCK2 DOG_LCD_RS_PIN&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code&lt;/h3&gt;The code is written in C++ using a minimal profile for small embedded systems, no dynamic object creation, no exceptions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;USB MIDI device descriptor&lt;/h4&gt;http://www.usb.org/developers/devclass_docs/midi10.pdf&lt;br /&gt;&lt;br /&gt;&lt;a title="USB MIDI device descriptors as C code" href="http://docs.google.com/Doc?docid=0AQkzMBFZwrYtZGN4a2Qzd2hfMzZkNnBybnJjNQ&amp;amp;hl=en" id="yilo"&gt;USB MIDI device descriptors as C code&lt;/a&gt;, &lt;a title="corresponding header file" href="http://docs.google.com/Doc?docid=0AQkzMBFZwrYtZGN4a2Qzd2hfNDBwa3dtcnZndg&amp;amp;hl=en" id="wsfx"&gt;corresponding header file&lt;/a&gt;&lt;h4&gt;Transmission buffers&lt;/h4&gt;All uart communications uses buffered DMA transactions&lt;br /&gt;&lt;br /&gt;spi to the display should also use DMA but with a DLYBCT of 50 giving a character spacing of approximatly 33us, the serial:: transmission logic can be reused (subclassed) here.&lt;br /&gt;&lt;br /&gt;The AT91SAM7 variable chipselects and chipselect decode mode together with 32 bit DMA SPI transmissions allows us to control both data bits and the RS line with automatic transfers to the Dog-Me display. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Testing&lt;/h3&gt;The system has been used as an USB to MIDI inteface betwen a Linux computer and a U220 synth module. The usb midi ports are autodetected and added as Alsa MIDI ports. Some USB communication gliches has been observed, but not frequent and not yet reproducible. Loopback tests with a standard MIDI cable connected from MIDI out to MIDI in works well.&lt;br /&gt;&lt;br /&gt;Round trip times on PC running Linux, Fedora 10,  PC(Alsa MIDI)-&amp;gt;USB MIDI IN-&amp;gt;MIDI OUT-&amp;gt;MIDI IN-&amp;gt;USB MIDI OUT-&amp;gt;PC  are 1.5 - 3 ms  (/home/lundin/delad/arbete/mikrop/usbmidi/miditest.c) with processing times up to 130uS using single message pings (090531 r357)&lt;br /&gt;Direct echo within the module , no serial MIDI, gives times of .8 to 2 ms&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Future &lt;/h3&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;With the basic USB and MIDI communications working, it is possible to expand the capabilities of the system.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The analog and digital inputs can be used to generate MIDI events from different sensors and there is spare processor capacity for MIDI processing.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;TWI EEPROM For settings&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Control panel&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I/O Extender&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;MIDI file player&lt;/p&gt;&lt;br /&gt;Sensor to midi event generation&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756201887955423383-4447547332639195885?l=arttools.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/4447547332639195885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8756201887955423383&amp;postID=4447547332639195885' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/4447547332639195885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/4447547332639195885'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/2009/07/midi7s-flexible-usb-midi-interface.html' title='MIDI7S - a flexible USB - MIDI interface'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756201887955423383.post-5925650549641186139</id><published>2008-08-08T03:14:00.008+02:00</published><updated>2009-07-30T17:48:43.231+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='device descriptor'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Using Python and XML for parsing USB descriptor structures to C</title><content type='html'>This project consists of a Python script that parses an XML description of USB descriptors and generates C code structures that can be included in a C firmware program for a USB device.  This tool is primarily intended for developers of USB devices on embedded platforms.  The XML representation of the descriptors gives a good view of the structure and the Python parser generates correct bDescriptorType values, bLength values and calculates  total lengths. For elements with a variable number of child elements, such as  bNumEndpoints in the Interface descriptor, the correct value is  inferred from the XML structure. Most elements have a default value that is inserted in the generated C data structure.  Symbolic values can be used for field values through XML entities defined in a DTD.  &lt;h3 id="bj85"&gt;Related work&lt;/h3&gt;This project  is part of a set of tools written in Python to simplify work with embedded development and USB. Most of the development work is done under Linux.  Other components in this effort are: &lt;ul id="jyek"&gt;&lt;li id="jyek0"&gt;usbmodule: A Python module that wraps libusb and gives raw access to USB devices, with experimental thread code to download and buffer incoming data before the application requests it, this works (for me) but it is unstructured, uncleaned and probable a bit buggy. This is similar to PyUSB http://pyusb.berlios.de/ , I have not had time to really check out this project, perhaps we should merge ....  &lt;/li&gt;&lt;/ul&gt;   &lt;ul id="jyek1"&gt;&lt;li id="jyek2"&gt;A python GUI application for firmware downloads to embedded systems, first written to program Parallax Javelin systems from Linux, then extended to talk to serial monitors on LPC2xxx and AT91SAM7 arm processors. Today it is mostly used for SPI flashing of Atmel AVR8 processors using an FT232 interface in bitbang mode (this is where the USB from Python is used)      &lt;/li&gt;&lt;/ul&gt;&lt;h3 id="sl9e0"&gt;Example&lt;/h3&gt;An example XML representation of  a device dsecriptor  &lt;div id="xvbk"&gt;&lt;blockquote style="background-color: rgb(255, 242, 204);" id="ojf:"&gt;&amp;lt;USB_Device_Descriptor name="devDescriptor" bcdUSB="0110" bDeviceClass="0" bDeviceSubclass="0" bDeviceProtocol="0" idVendor="EB03" idProduct="2463" bcdDevice="0000" iManufacturer="1" iProduct="2" iSerialNumber="3" bNumConfigs="1"/&amp;gt; &lt;/blockquote&gt;and the output in C code format that is generated &lt;/div&gt;&lt;blockquote style="background-color: rgb(255, 242, 204);" id="k4_5"&gt;&lt;span style="font-family:courier new;"&gt;const char devDescriptor [] = {      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// Device Descriptor &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/* 0 */         0x12,            //bLength &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/* 1 */         0x1,               //bDescriptorType&lt;br /&gt;/* 2 */         0x10,         &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;    //bcdUSB&lt;br /&gt;/* 2 */         0x1,&lt;br /&gt;/* 4 */         0x0,          &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;     //bDeviceClass&lt;br /&gt;/* 5 */         0x0,                 &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//bDeviceSubclass&lt;br /&gt;/* 6 */         0x0,                 //bDeviceProtocol&lt;br /&gt;/* 7 */         0x8,               &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//bMaxPacketSize0&lt;br /&gt;/* 8 */         0x3,               &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//idVendor&lt;br /&gt;/* 8 */         0xeb,&lt;br /&gt;/* 10 */        0x63,            &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//idProduct&lt;br /&gt;/* 10 */        0x24,&lt;br /&gt;/* 12 */        0x0,              &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//bcdDevice&lt;br /&gt;/* 12 */        0x0,&lt;br /&gt;/* 14 */        0x1,              &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//iManufacturer&lt;br /&gt;/* 15 */        0x2,                //iProduct&lt;br /&gt;/* 16 */        0x3,              &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//iSerialNumber&lt;br /&gt;/* 17 */        0x1                &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;//bNumConfigs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt; &lt;/blockquote&gt; &lt;h3 id="jy26"&gt;Status&lt;/h3&gt;Currently the tool can generate what looks as correct C code structures, with examples from USB specification. The output has not been tested and used as descriptor structures in actual USB firmware.  The Python code can be run as a simple command line tool.  There is a lack of documentation for the XML tags and attributes used.  Future work devoted to this will depend on the testing and also interest from third parties-  &lt;h3 id="jy262"&gt;Future work&lt;/h3&gt;Use the output from this tool as descriptors for a MIDI interface implemented on an AT91SAM7S development board.  Use the output from this tool as descriptors for a HID device implemented on an AT91SAM7S development board connected to .  This document/page will also be updated and made more complete depending on external feedback.  &lt;h3 id="jy265"&gt;Contact&lt;/h3&gt;Magnus Lundin  If you are interested in this project contact me at:   lundin at mlu dot mine dot nu&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756201887955423383-5925650549641186139?l=arttools.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/5925650549641186139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8756201887955423383&amp;postID=5925650549641186139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/5925650549641186139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/5925650549641186139'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/2008/08/using-python-and-xml-for-parsing-usb_07.html' title='Using Python and XML for parsing USB descriptor structures to C'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756201887955423383.post-4878206541077730463</id><published>2008-08-08T02:49:00.002+02:00</published><updated>2008-08-08T12:46:55.346+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microcomputers'/><category scheme='http://www.blogger.com/atom/ns#' term='Art'/><title type='text'>Welcome</title><content type='html'>&lt;span style="font-size:130%;"&gt;Hi there, and welcome to all who are interested in Art and Microcomputers&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And in the power to create your own designs.&lt;br /&gt;&lt;br /&gt;A new blog !!!&lt;br /&gt;I am not sure the world needs so many more blogs. But I will use this space to discuss some of my ideas on tools used in connection with art and microprocessors.&lt;br /&gt;&lt;br /&gt;Hopefully I will also get some feedback from you out there, passionate users of microprocessors and connected hardware in artistic projects.&lt;br /&gt;&lt;br /&gt;Some background:&lt;br /&gt;I have a background as a programmer, mathematician and also as a dancer. I have done projects in this field since around 1991  when  I worked on  computer choreography tools with the Kacor group (Stockholm) .  Since then I have done computer control for dance performance music, when that was still mostly done by swapping casette tapes and for the last ten years I have mostly worked with choreographer Åsa Unander-Scharin at Scen och Sinnesproduktion  and produced some mechatronic installations with her, notably Orpheus and Petrushka .&lt;br /&gt;&lt;br /&gt;This work has evolved from purely software to a very mixed  mixed bag of software, hardware and firmware. During this process I have used and also constructed a wide array of tools. Some of this might be interesting to YOU ?&lt;br /&gt;&lt;br /&gt;So, a new blog ... we will see&lt;br /&gt;&lt;br /&gt;Yes I do have a "regular" job at the side to pay rent and other expenses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756201887955423383-4878206541077730463?l=arttools.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arttools.blogspot.com/feeds/4878206541077730463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8756201887955423383&amp;postID=4878206541077730463' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/4878206541077730463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756201887955423383/posts/default/4878206541077730463'/><link rel='alternate' type='text/html' href='http://arttools.blogspot.com/2008/08/hi-there-and-welcome-to-all-who-are.html' title='Welcome'/><author><name>Magnus Lundin</name><uri>http://www.blogger.com/profile/17303004553752920522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
