<?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-3408232604952387301</id><updated>2011-11-28T01:22:14.247+01:00</updated><category term='variadic'/><category term='dsplink'/><category term='gsoc'/><category term='coherency'/><category term='forward'/><category term='marshalling'/><category term='invocation'/><category term='rpc'/><category term='documentation'/><category term='cache'/><category term='dynamic'/><category term='C'/><category term='heterogenous multicore processing'/><category term='beagleboard'/><category term='gzip'/><category term='samples'/><category term='report'/><category term='build'/><category term='call'/><category term='weekly report'/><category term='dsp/link'/><category term='ti-devshell'/><category term='openembedded'/><category term='dsp'/><category term='c6runapp'/><category term='ubuntu'/><category term='float'/><category term='crc error'/><category term='dsp-rpc-posix'/><title type='text'>maltanar's scribbles</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-8407425476891885032</id><published>2010-08-16T13:24:00.000+02:00</published><updated>2010-08-16T13:24:33.226+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Finaly Weekly Report, no #13</title><content type='html'>So here comes the final weekly report... I just want to say once again what a wonderful experience it has been to work with the BeagleBoard for GSoC! As I stated in my previous week's report, I do believe I've managed to complete most of what I (and my mentors) had in mind for the end of the GSoC period. There's (as always!) more to do, of course... and I intend to continue development for C6Run in specific and BeagleBoard in general (though with the start of the academic year, it's unlikely that I'll be able to devote as much time), though right now I could really use a little break, and will be taking one :)&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Weekly Report #13&amp;nbsp;&lt;/b&gt;&lt;br /&gt;Submitted on 2010-08-16&lt;br /&gt;Covers 2010-08-09 to 2010-08-16&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;• documentation moved to its own eLinux wiki page (at http://elinux.org/BeagleBoard/GSoC/2010_Projects/C6Run/Documentation), divided into two sections (Usage, Architecture) and expanded&lt;br /&gt;• build system modifications: support auto-copying of the generated stub files by the stub generator utility, make a folder for user sources&lt;br /&gt;• code cleanup: move GPP&amp;amp;DSP common definitions to a single header file, work on GPP-side pointer alignment problems, partition GPP-side code into modules&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-8407425476891885032?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/8407425476891885032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/08/finaly-weekly-report-no-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8407425476891885032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8407425476891885032'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/08/finaly-weekly-report-no-13.html' title='Finaly Weekly Report, no #13'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6596667151210004535</id><published>2010-08-11T13:13:00.000+02:00</published><updated>2011-04-23T19:29:07.550+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><title type='text'>Documentation's moved</title><content type='html'>Just writing to let my readers know that the C6Run documentation has moved to the elinux wiki and will be residing there from now on:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://elinux.org/BeagleBoard/GSoC/2010_Projects/C6Run/Documentation"&gt;http://elinux.org/BeagleBoard/GSoC/2010_Projects/C6Run/Documentation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've been working on expanding and improving it yesterday, and there's more to come.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6596667151210004535?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6596667151210004535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/08/documentations-moved.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6596667151210004535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6596667151210004535'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/08/documentations-moved.html' title='Documentation&apos;s moved'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-778607433675465410</id><published>2010-08-09T12:39:00.002+02:00</published><updated>2010-08-09T12:39:57.076+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Weekly Report #12</title><content type='html'>Weekly Report #12&lt;br /&gt;Submitted on 2010-08-09&lt;br /&gt;Covers 2010-08-02 to 2010-08-09&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reflections&lt;/b&gt;&lt;br /&gt;As we're past the soft deadline (aka "the suggested pencils down date" in GSoC speak) I wanted to write a bit about how DSP-RPC-POSIX has progressed so far. I'd say that the project is now in a state that can do most of the things that me (and my mentors) had imagined it would be doing by now. C6Run's own goals of easy DSP app prototyping with console/file system access are pretty much accomplished, as is being easy to get started with (although there are debatable issues surrounding this particular goal, see below). DSP-RPX-POSIX's twofold goals, which were basically being able to call GPP side functions from the DSP, and providing a prebuilt set of POSIX (actually, "standard C Library" would be a much appropriate term) remote accessor functions, are also met. Right now, a sample DSP development cycle for a beginner developer utilizing the aid of C6Run could look like:&lt;br /&gt;&lt;br /&gt;• obtaining the sources from SVN&lt;br /&gt;• setting up (which includes a script that downloads and sets up the C6Run dependencies) and building&lt;br /&gt;• using C6RunApp and DSP-RPC-POSIX to construct, test and debug the wanted DSP-side algorithm&lt;br /&gt;• using C6RunLib to wrap up the finalized DSP-side algorithm with an ARM library and use this library to build DSP-aided GPP apps&lt;br /&gt;&lt;br /&gt;The specific capabilities and properties of DSP-RPC-POSIX include:&lt;br /&gt;&lt;br /&gt;• ability to call most C standard library functions on the GPP side without any extra effort (stubs are already generated)&lt;br /&gt;• ability to call any GPP-side function, with support for all basic parameter types and buffers and obtain the return value, provided that stubs for the target function exist&lt;br /&gt;• a stub generation tool to easily generate stubs for GPP-side functions (given a number of C source files, it will generate the stubs necessary for RPC access to all the functions contained)&lt;br /&gt;• function signature system allows addition of new data types for parameters/return types with special treatment&lt;br /&gt;• architecturally, the RPC layer is mostly seperate from C6Run's other functionality so it could be taken apart and used in other projects&lt;br /&gt;&lt;br /&gt;There are, of course, certain shortcomings:&lt;br /&gt;&lt;br /&gt;• C6Run still does not build as part of OE. the build system has been modified to skip rebuilding existing dependencies, but there are still problems building for the Beagle. once these are fixed it won't take long to have a OE recipe in place. to my knowledge, there are folks at TI which are already working on this.&lt;br /&gt;• pointers/buffers issues: double/triple/etc. pointers, pointers inside structs, pointers hidden inside buffers (ie, any pointer that is not explicitly declared as a parameter) can't be handled automatically and need to be manually address-translated by the user.&lt;br /&gt;• structs can't be passed as parameters since a different signature character would be needed for each, they need to be passed as pointers to structs instead&lt;br /&gt;• pointers/buffers to be passed via RPC need to be either less than a fixed number of bytes, or be allocated using rpc_malloc instead of from the DSP heap or stack&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;• DSP-side caches are re-enabled for all platforms, stubs that use pointer/buffer parameters call the needed writeback/invalidate functions when needed to keep cache coherence&lt;br /&gt;• ARM-side cache coherence code and cache coherency testing example in place&lt;br /&gt;• stubs for string.h functions and POSIX low level I/O functions&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;br /&gt;• what Google suggests after the soft pencils down date - code scrubbing (mainly fixing possible memory alignment issues, moving commonly used things to GPP/DSP shared header files etc.), improving documentation and writing more tests/examples&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;br /&gt;• for some reason (probably due to the absence of a BCACHE_wbAll function on DSP-side?) enabling ARM caches still results in cache coherency problems.&lt;br /&gt;• the C6Run trunk still produces problematic executables for the BeagleBoard, so a merge with the dsp-rpc-posix branch doesn't make sense at this point, which means OE integration won't make it to the GSoC deadline&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-778607433675465410?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/778607433675465410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/08/weekly-report-12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/778607433675465410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/778607433675465410'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/08/weekly-report-12.html' title='Weekly Report #12'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-7218460338295877455</id><published>2010-08-04T16:10:00.002+02:00</published><updated>2011-04-23T19:29:07.551+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='coherency'/><title type='text'>Cache Coherency</title><content type='html'>The presence and usage of ARM and DSP side caches poses a cache coherency problem when we want to access a shared area by both processors. Let's consider the following scenario:&lt;br /&gt;&lt;br /&gt;1. A CMEM buffer is allocated for shared usage by the GPP side and its physical pointer is passed to the DSP.&lt;br /&gt;2. The DSP wants to read and then write some data into this buffer. Let's say that there are free entry slots in the DSP L2 cache - so the data actually gets written to the DSP cache, instead of making it to the DDR shared region. The DSP then signals the GPP that it's done with the buffer for the time being.&lt;br /&gt;3. The GPP attempts to read the buffer, but what it reads is just the garbage values present in the buffer after initialization since the DSP-written data is in the DSP cache. This buffer also gets cached in the ARM-side now, so when the GPP tries to write some new data into it, it stays into the ARM cache and doesn't make it to the main memory either.&lt;br /&gt;4. If the DSP tries to read the cache now, it won't get what the ARM has written into it most recently since it'll be reading from its own cache, and vice-versa for the ARM side.&lt;br /&gt;&lt;br /&gt;We can see that the "same" buffer actually exists in three different locations (main memory, DSP cache, ARM cache), all of which can contain totally different data - in this case it is said that they are not coherent, and that we have a cache coherency problem. &lt;br /&gt;&lt;br /&gt;In most cached systems, there are cache coherency protocols which prevent these situations from occuring. The TMS320C64x+ DSP Cache User's Guide states:&lt;br /&gt;&lt;br /&gt;In the following cases, it is your responsibility to maintain cache coherence:&lt;br /&gt;â€¢ DMA or other external entity writes data or code to external memory that is then read by the CPU&lt;br /&gt;â€¢ CPU writes data to external memory that is then read by DMA or another external entity&lt;br /&gt;&lt;br /&gt;thus we have to manually maintain cache coherence for mutual access to CMEM regions by the DSP and the GPP. Studying the scenario above, we can observe that there are two underlying problems:&lt;br /&gt;&lt;br /&gt;1. If the memory block to be read already exists in the local cache, there's a risk that the local cache is outdated: we need to discard the local cache entries and fill them up with information from the main memory. This process is called cache invalidation.&lt;br /&gt;2. When the memory block is to be written into, there's a risk that the info remains in the local cache and doesn't make it to the main memory: we have to make sure that the new info gets written to the main memory as well. This process is called cache writeback.&lt;br /&gt;&lt;br /&gt;Therefore, from a RPC perspective, for a call that involves transferring buffers, the steps we have to take are as follows:&lt;br /&gt;&lt;br /&gt;1. Before passing the marshalled info via DSP/Link, the DSP must do a cache writeback&lt;br /&gt;2. Before passing the params to the GPP side stub, the GPP must do a cache invalidate&lt;br /&gt;3. After the GPP side stub is finished, the GPP must do a cache writeback&lt;br /&gt;4. The DSP side stub must do a cache invalidate before terminating&lt;br /&gt;&lt;br /&gt;This is assuming that both processor caches will be active - in case the DSP cache is disabled, the steps 1 and 4 will not be necessary, and likewise with steps 2 and 3 for a disabled GPP cache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-7218460338295877455?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/7218460338295877455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/08/cache-coherency.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/7218460338295877455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/7218460338295877455'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/08/cache-coherency.html' title='Cache Coherency'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-1692075662894688452</id><published>2010-08-02T12:12:00.002+02:00</published><updated>2010-08-02T12:12:22.636+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Weekly Report #11</title><content type='html'>Weekly Report #11&lt;br /&gt;Submitted on 2010-08-02&lt;br /&gt;Covers 2010-07-26 to 2010-08-02&lt;br /&gt;&lt;br /&gt;Status and Accomplishments&lt;br /&gt;• an elementary version of the mechanism to be able to pass DSP-allocated (stack or heap) buffers to RPC functions is now in place. what essentially happens is that when the GPP side detects a non-CMEM-allocated buffer is passed as a parameter, it uses PROC_read to read from the DSP memory and copy this into a regular GPP buffer which the functions can access. &lt;br /&gt;• bugfixes for RPC functions returning structures - but pointer parameters inside structs still remain an issue and have to be translated manually&lt;br /&gt;• dsp-rpc-posix branch re-synced with c6run trunk,  but to no avail (see blockers section)&lt;br /&gt;&lt;br /&gt;Plans and Tasks&lt;br /&gt;• the ARM and DSP caches are both disabled for dsp-rpc-posix to deal with cache coherency, but this impacts the memory access performance quite negatively - enable them again and use writeback/invalidate functions to keep caches in sync&lt;br /&gt;• some POSIX functions are still missing from the RPC library since their corresponding header files (with type definitions and all) don't exist for the DSP side. this includes useful things like ioctls - find a way to expose these through RPC&lt;br /&gt;&lt;br /&gt;Risks, issues, blockers&lt;br /&gt;• despite all the time I spent on it, I couldn't uncover the cause of the "bus error" that occurs when I compile even the simplest things (such as hello world) with the latest C6Run trunk (so it's not just my synced branch that's troublesome). in some cases it's just "bus error" and the program stopping, in others the PROC_setup fails. the code responsible for these parts hasn't really changed so I'm suspecting it to be a build/configuration issue. due to this and the fact that my primary computer's hard drive crashed (I'm stuck with a silly little netbook!) I haven't been able to try and build C6Run inside OE. I'm not sure if this is just happening for me or the c6run trunk is broken (there are indeed some errors that prevent it from building but they are small and easy to fix)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-1692075662894688452?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/1692075662894688452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/08/weekly-report-11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1692075662894688452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1692075662894688452'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/08/weekly-report-11.html' title='Weekly Report #11'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-4150317089372156885</id><published>2010-07-26T12:04:00.003+02:00</published><updated>2010-07-26T13:32:32.032+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Weekly Report #10</title><content type='html'>Weekly Report #10&lt;br /&gt;Submitted on 2010-07-26&lt;br /&gt;Covers 2010-07-19 to 2010-07-26&lt;br /&gt;&lt;br /&gt;Status and Accomplishments&lt;br /&gt;• the stub generation script (c6runapp-rpcgen) is now in place; provided with a number of C source files it can generate the corresponding GPP and DSP stubs for the functions defined in the given files, thus exposing them via RPC&lt;br /&gt;• the documentation is expanded to include architectural details and will be maintained in the project wiki pages &lt;a href="http://code.google.com/p/dsp-rpc-posix/w/list"&gt;here&lt;/a&gt;&lt;br /&gt;• more RPC examples to cover newly added things like stdio.h variadics and functions returning structures&lt;br /&gt;• synchronized branch with the latest C6Run trunk, whose modified build system can create the C6Run libs without having to re-build the dependencies every time - but there are problems&lt;br /&gt;&lt;br /&gt;Plans and Tasks&lt;br /&gt;• investigate why the trunk-synced branch errors out on the produced executables ("Bus error", including on the non-RPC examples) and fix this&lt;br /&gt;• experiment with building a bitbake recipe for C6Run to get it built inside OE&lt;br /&gt;• for predefined RPC stubs whose pointer parameters are only "in" (ie, the RPC target won't modify the contents of the memory pointed) implement a mechanism that will allow these parameters to be alloc'd from the DSP stack or heap - having to allocate every little string via rpc_malloc is annoying&lt;br /&gt;&lt;br /&gt;Risks, issues, blockers&lt;br /&gt;• it's not clear why the bus errors occur with the latest trunk-synced version but hopefully it'll be something that I overlooked while merging the changes from the trunk, or possibly a problem with the version of the trunk I used&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-4150317089372156885?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/4150317089372156885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4150317089372156885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4150317089372156885'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-10.html' title='Weekly Report #10'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-1230628404976165311</id><published>2010-07-19T12:10:00.002+02:00</published><updated>2011-04-23T19:29:07.553+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamic'/><category scheme='http://www.blogger.com/atom/ns#' term='call'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='variadic'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='invocation'/><category scheme='http://www.blogger.com/atom/ns#' term='forward'/><title type='text'>Forwarding invocation of variadic function in C</title><content type='html'>I had been brooding over how to do the RPC calls for variadic functions for some time now. Although marshalling any given variadic isn't really possible due to a lack of general method for obtaining argument count and sizes (see my weekly report #9, issues section), for commonly used stdio.h variadics such as printf and scanf, the arguments are well-defined by the format string so it should be possible to manually marshal these.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll be writing a seperate blog post about how I went about doing that, but for now I want to talk about a sub-problem of this: given a number of arguments, how do you forward these to a variadic function? A re-statement could be, how to "dynamically" invoke a variadic function?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looking this up in the net, I've found these two discussions to be the most relevant:&lt;/div&gt;&lt;div&gt;&lt;a href="http://stackoverflow.com/questions/150543/forward-an-invocation-of-a-variadic-function-in-c"&gt;http://stackoverflow.com/questions/150543/forward-an-invocation-of-a-variadic-function-in-c&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://stackoverflow.com/questions/150543/forward-an-invocation-of-a-variadic-function-in-c"&gt;&lt;/a&gt;&lt;a href="http://stackoverflow.com/questions/1721655/passing-parameters-dynamically-to-variadic-functions"&gt;http://stackoverflow.com/questions/1721655/passing-parameters-dynamically-to-variadic-functions&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://stackoverflow.com/questions/1721655/passing-parameters-dynamically-to-variadic-functions"&gt;&lt;/a&gt;The second link mentions a library called FFCALL which can be used to pass parameters to variadics dynamically, and this probably is the ideal way of doing things. &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I &lt;i&gt;may&lt;/i&gt; have found another method for this - so far as I've seen it works on x86 and ARM. It's based on the assumption that the last mandatory parameter and all the variadic parameters reside continuously in the memory, as well as lots of terrible coding practices, but it should be illustrative enough.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I'm doing is basically copying a fixed number of bytes from the memory region (=stack) where the variadic parameters are located into a buffer, then passing this buffer to another variadic function which is called with a fixed number of arguments (I picked doubles since they are larger and will allocate more space on the called function's stack). The function then calls memcpy to overwrite its variadic args section with the passed buffer, and afterwards can call the stdarg macros to obtain the variadic arguments, or pass them to something like vprintf.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's the code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdarg.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void accepter(char *fmt, char *ptr, ...);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void forwarder(char *fmt, ...);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void forwarder(char *fmt, ...)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;double d = 9.1;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char *buf = (char*) malloc(10*sizeof(double));&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;memcpy(buf, (void*)((unsigned int)(&amp;amp;fmt)+sizeof(char*)), 80);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FILE *o = fopen("tmp", "wb");&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fwrite(buf, 10, sizeof(double), o);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fclose(o);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// call function with 10 double arguments to open up stack space&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;accepter(fmt, buf, d, d, d, d, d, d, d, d, d, d);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;free(buf);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void accepter(char *fmt, char *ptr, ...)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;memcpy((void*)((unsigned int)(&amp;amp;ptr)+sizeof(char*)), ptr, 10*sizeof(double));&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;va_list ap;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;va_start(ap, ptr);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;vprintf(fmt, ap);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;va_end(ap);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("Testing...\n");&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;double d = 65.98;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;forwarder("%d %d %d ermm %s and more params! %x %f %x %x \n", 1, 2, 3, "hello world", 199, d , 0xdeadbeef, 0xbeefdead);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-1230628404976165311?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/1230628404976165311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/forwarding-invocation-of-variadic.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1230628404976165311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1230628404976165311'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/forwarding-invocation-of-variadic.html' title='Forwarding invocation of variadic function in C'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6685318151393081294</id><published>2010-07-19T10:50:00.000+02:00</published><updated>2010-07-19T10:50:35.629+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Weekly Report #9</title><content type='html'>&lt;b&gt;Weekly Report #9&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Submitted on 2010-07-19&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Covers 2010-07-12 to 2010-07-19&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;• support for returning structures by the addition of a special return type signature ('#')&lt;br /&gt;• address translations are now exposed through RPC, so the user is able to perform translations manually&lt;br /&gt;• build system modifications - DSP and GPP-side stubs are now collected from inside two directories instead of two single files&lt;br /&gt;• dsp-rpc-posix branch updated to contain the latest changes in the C6Run trunk&lt;br /&gt;• manual marshalling for stdio.h variadics (printf, scanf, fprintf, sprintf...)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;br /&gt;• implement scripted stub generation (ie, the user will provide function declarations and the corresponding GPP and DSP-side stubs will be generated by a script)&lt;br /&gt;• complete architectural documentation&lt;br /&gt;• expand library of RPC examples to illustrate use-cases with different function signatures&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;br /&gt;• since there is no general way of extracting the number and size of parameters in variadic functions (eg, one function may only specify the number of args as the first fixed parameter and accept only integer args, while another may take a zero-argument as a terminator of a number of float args, and yet another may use printf-style encoding), we can't implement a generic marshaller for variadics. for this reason, support for user-defined variadics is left out for now, although users writing their own variadic functions isn't very common and this is not expected to become an issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6685318151393081294?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6685318151393081294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6685318151393081294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6685318151393081294'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-9.html' title='Weekly Report #9'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6214766686935362943</id><published>2010-07-12T12:26:00.002+02:00</published><updated>2010-07-12T12:26:58.755+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>Weekly Report #8</title><content type='html'>&lt;b&gt;Weekly Report #8&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Submitted on 2010-07-12&lt;br /&gt;Covers 2010-07-05 to 2010-07-12&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;• lots of work went to solving the long-standing buffer/pointer parameters and return types issue, and we finally have a reasonably well-working system in place. all address translation / memory space mapping is now done automatically, provided that any pointers to be passed are pointing to memory allocated using the RPC allocator (CMEM based). &lt;br /&gt;• three types of pointer return types are identified and supported: no-translation pointers (such as FILE* which aren't meant to be dereferenced at all), direct-translation pointers (such as strspn whose return value points to somewhere within the passed parameter) and manual-copy pointers (such as ctime when the function allocates memory with some other method and passes that pointer, size information needs to be specified in the GPP stub)&lt;br /&gt;• most C I/O stubs are now complete (the ones remaining are variadics and infeasible things like threads)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;br /&gt;• find a way for marshalling variadic function calls (will probably involve manual work) and complete the remaining stubs&lt;br /&gt;• test completed stubs with existing code&lt;br /&gt;• offer more flexibility for buffer/pointer parameters by providing the ability to do address translations manually and maybe detecting non-shared buffers in the DSP-side stubs then syncing them automatically with some shared ones&lt;br /&gt;• support multiple stub input files instead of placing them only in rpc_stubs_gpp.c and rpc_stubs_dsp.c&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;br /&gt;• variadic functions such as printf and scanf are problematic for marshalling - since there is no well-defined way of knowing how many parameters of which size there is, it's likely that the user will have to provide the parameter packing for these manually&lt;br /&gt;• even when the stub generator tool is in place, it's likely that the user will have to provide some manual guidance for certain cases in stub generation such as identifying buffer/pointer parameters which don't need address translation, return types which need manual copying into a shared buffer and variadic functions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6214766686935362943?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6214766686935362943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-8.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6214766686935362943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6214766686935362943'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/weekly-report-8.html' title='Weekly Report #8'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-5258058868312442245</id><published>2010-07-05T16:44:00.000+02:00</published><updated>2011-04-23T19:29:07.554+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='marshalling'/><category scheme='http://www.blogger.com/atom/ns#' term='variadic'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='float'/><category scheme='http://www.blogger.com/atom/ns#' term='rpc'/><title type='text'>So what happened to the variadic marshaller?</title><content type='html'>As you may recall, I had a variadic marshaller I had been using for the RPC layer for some time now, which recently had to be dropped since it was causing trouble with passing float parameters. I wanted to talk about here a little bit since it's not really a specific problem concerning DSP or marshallers, but rather how certain arguments are passed to variadic functions.&lt;br /&gt;&lt;br /&gt;Let's start by talking about what a variadic function is, since you may or may not have heard the term. A &lt;i&gt;variadic function &lt;/i&gt;is a function that can take a varying number of arguments. There usually are a few "required" arguments but the sky (or rather, the bottom of the stack :)) is the limit. Sounds familiar? Yes indeed, probably the two most famous functions in the C library are variadic: printf and scanf.&lt;br /&gt;&lt;br /&gt;Variadics in C are easily identifiable by their declarations, which looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;int summation_function(int count, ...)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;notice the ellipsis ( ... ) - this is the notation used to state that there will be an arbitrary number of arguments here.&lt;br /&gt;&lt;br /&gt;And for quick reference - accessing the variadic arguments is done via stdarg.h macros, for example:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;va_list arg_list;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;va_start(arg_list, count);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;for(int i=0; i &amp;lt; count; i++)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;sum += va_arg(int);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;va_end(arg_list);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;whose detailed usage descriptions you can find easily by Googling.&lt;br /&gt;&lt;br /&gt;Moving back to the problem I had with the variadic marshaller: I was passing regular 4-byte floats as arguments to be marshalled, but somehow the 4-byte region corresponding in the marshalled buffer always showed up to be corrupted somehow.&lt;br /&gt;&lt;br /&gt;The issue was eventually revealed to be about the default argument promotions that are applied to variadics, as described in:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gnu.org/s/libc/manual/html_node/Calling-Variadics.html"&gt;http://www.gnu.org/s/libc/manual/html_node/Calling-Variadics.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;therefore, any short int or char arguments passed are automatically promoted to int's, and all float's are casted into double's - thus having a 8 byte representation whose first 4 bytes don't really mean all that much :)&lt;br /&gt;&lt;br /&gt;My initial idea was to simply cast the obtained double parameter back into a float before marshalling it into the buffer, but unfortunately this leads to loss of precision during double-&amp;gt;float conversion. Therefore, I've decided to switch to using macros and doing the parameter marshalling directly inside the stubs. Comparing what the DSP-side stubs look like in the old vs. new methods of marshalling:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;void rpc_mixedprint(int a, char b, float c, double d, short e, int f)&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rpc_marshal("rpc_mixedprint", "vicfdsi",a,b,c,d,e,f);&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rpc_perform();&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;versus&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;void rpc_mixedprint(int a, char b, float c, double d, short e, int f)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_INIT("rpc_mixedprint", "vicfdsi");&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(int, &amp;amp;a);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(char, &amp;amp;b);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(float, &amp;amp;c);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(double, &amp;amp;d);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(short, &amp;amp;e);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PACK(int, &amp;amp;f);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPC_PERFORM();&lt;/b&gt;&lt;br /&gt;&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;I'm aware it doesn't look quite as elegant as the variadic marshaller did... but in terms of ease of stub generation, it's not all that different, and there's no loss of data precision involved. And the GPP-side stub uses macros to extract the parameters as well, once the unmarshaller unpacks the buffer into the void** param_buffer:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;void rpc_mixedprint(void **param_buffer, void *result_buffer)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mixedprint(RPC_CAST_PARAM(param_buffer[0], int),&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RPC_CAST_PARAM(param_buffer[1], char),&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RPC_CAST_PARAM(param_buffer[2], float),&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RPC_CAST_PARAM(param_buffer[3], double),&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RPC_CAST_PARAM(param_buffer[4], short),&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RPC_CAST_PARAM(param_buffer[5], int)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;/b&gt;&lt;br /&gt;&lt;b&gt;}&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-5258058868312442245?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/5258058868312442245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/so-what-happened-to-variadic-marshaller.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/5258058868312442245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/5258058868312442245'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/so-what-happened-to-variadic-marshaller.html' title='So what happened to the variadic marshaller?'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-2562227062798521309</id><published>2010-07-05T13:19:00.001+02:00</published><updated>2010-07-05T19:26:52.606+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #7</title><content type='html'>&lt;b&gt;Weekly Report #7&lt;/b&gt;&lt;br /&gt;Submitted on 2010-07-05&lt;br /&gt;Covers 2010-06-28 to 2010-07-05&lt;br /&gt;Corresponding Draft Schedule Item:&lt;br /&gt;Create the RPC framework that can call functions on the GPP side from the DSP and return values back to the DSP. &amp;nbsp;Implement and unit-test the POSIX function wrappers according to the planned order.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the RPC framework was tested with many different kinds and combinations of non-buffer parameters, a few bugs unearthed and the issue with floats issued as variadic parameters led to the deprecation of the variadic marshaller. DSP-side stubs use macros to do the marshalling now. not as elegant but works far better.&lt;/li&gt;&lt;li&gt;the GPP-side RPC stubs dynamic link library is now embedded directly inside the resulting executable for cleaner deployment (ie, the user doesn't have to copy the library manually to the Beagle)&lt;/li&gt;&lt;li&gt;rpc_malloc and rpc_free handlers using CMEM for alloc/free and address translation added into the GPP server, so basic buffer/pointer parameters support will soon be in place&lt;/li&gt;&lt;li&gt;implemented a simple version of the ARM function caller, but doesn't work with double arguments or 4+ params of any kind. the macro-based parameter passing method works fine for now, though, and I intend to keep it for a while longer.&lt;/li&gt;&lt;li&gt;all POSIX/C lib stubs for functions that don't take any buffer parameters are now in place (there isn't that many, though :))&lt;/li&gt;&lt;li&gt;first usable version of dsp-rpc-posix committed to the repository&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;more testing and support for buffer parameters - there's still questions here, see issues section&lt;/li&gt;&lt;li&gt;write stubs for the POSIX functions with buffer parameters/return types&lt;/li&gt;&lt;li&gt;review the build system (how the user provides his/her own sources for use in RPC) and make improvements where necessary, see issues section&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the user needs to be able to provide source code and declarations for functions he/she intends to use with RPC - how should this be ideally done? keep them in a pre-determined directory and have the user add them there (easy but not very flexible)? pass them to the tool as command line parameters prefixed with something special?&amp;nbsp;&lt;/li&gt;&lt;li&gt;the GPP and DSP-side stubs for custom functions need to be provided manually for now. although it's relatively straightforward to do by hand, it's very very suitable for automation and I intend to have a stub generator script for this. I'd prefer not to have to write a C parser though, anything available I can use for this?&lt;/li&gt;&lt;li&gt;the situation with buffer parameters issue is as follows at the moment: any buffer parameters the user wants to pass on via RPC *must* be allocated via the rpc_malloc call. this call is mapped to GPP-side CMEM allocation and the GPP server performs virtual-to-physical address translation before passing the buffer address to the DSP, so the DSP can directly work on this buffer. but there isn't any direct physical-&amp;gt;virtual address translation available on the GPP side - what's the best way to deal with this? currently the C6Run allocator saves 16 bytes of extra info, including the virtual base address, along with the allocated buffer, and this is how we get rpc_free to work. but there'll be problems if the user doesn't directly pass the allocated buffer, but just a part of it - how will we find the virtual address then? even if we can find the virtual address for any given physical address...we can only do address translation if we're aware if it's required. what if the user puts a physical address somewhere inside a struct, or even inside another buffer (say, a void** parameter) ?&lt;/li&gt;&lt;li&gt;one solution to this could be adding the allocated virtual addresses to the DSP MMU TLB and have the DSP work directly with virtual addresses. but there's only 31 slots available in the table &amp;nbsp;:( &lt;b&gt;EDIT&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;i&gt;this is not a solution at all, the DSP MMU doesn't do any address translation at all&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;i&gt;(virtual = physical)&lt;/i&gt;&lt;/span&gt;! it's just for protection (preventing DSP from accessing places it's not supposed to)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;another solution could be making this the user's problem: providing virtual addresses from rpc_malloc and making the user do virtual-&amp;gt;physical translation on their own (via another RPC function, of course :)) if it's needed.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-2562227062798521309?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/2562227062798521309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/gsoc-weekly-report-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/2562227062798521309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/2562227062798521309'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/gsoc-weekly-report-7.html' title='GSoC Weekly Report #7'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-1336777280678860927</id><published>2010-07-03T20:05:00.000+02:00</published><updated>2011-04-23T19:29:07.556+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='rpc'/><title type='text'>DSP-RPC-POSIX initial commit is in place!</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;I've made the initial commit for dsp-&amp;gt;gpp RPC calls (the development had been on my personal SVN repo so far, since I didn't feel it was ready to see daylight :P)&lt;br /&gt;&lt;br /&gt;It's nothing spectacular yet (e.g no buffer/pointer parameters or&amp;nbsp;return values allowed, so only ctype and math c library calls) and you&amp;nbsp;probably won't think very highly of the coding style (or the way I do&amp;nbsp;things in the makefiles...) either, but it still works :)&lt;br /&gt;&lt;br /&gt;The SVN URL is:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gforge.ti.com/svn/dspeasy/branches/dsp-rpc-posix" style="color: #0658b5;" target="_blank"&gt;http://gforge.ti.com/svn/&lt;wbr&gt;&lt;/wbr&gt;dspeasy/branches/dsp-rpc-posix&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's a readme file under the top-level rpc/ directory which should&amp;nbsp;be sufficient to get started.&lt;br /&gt;&lt;br /&gt;possible makefile/build issue: the version of LPM I was using&amp;nbsp;(local_power_manager_linux_1_&lt;wbr&gt;&lt;/wbr&gt;24_02_09) has lpm.av5T instead of&amp;nbsp;lpm_linux.av5T (as was stated in the original C6Run makefiles) so I've&amp;nbsp;changed that. just find/replace it the other way around in&amp;nbsp;build/gpp_libs/modules/&lt;wbr&gt;&lt;/wbr&gt;Makefile if it complains about that.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Some notes:&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I had to put away my variadic marshaller since it was causing&amp;nbsp;issues with floats (why? blog post coming soon!) - all marshalling is done inside the stubs with&amp;nbsp;macros. Takes more lines but it's probably a better idea in the longer&amp;nbsp;run.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The main points of interest in terms of code would be: the files&amp;nbsp;under the rpc/ directory (dsp and gpp side stubs, some additional dsp&amp;nbsp;side functions), rpc_server.c and .h under build/gpp_libs (gpp&amp;nbsp;unmarshalling, symbol location and execution), cio_ipc.c (gpp RPC&amp;nbsp;server, inside the C6Run C I/O server) c6run.c under build/gpp_libs&amp;nbsp;(extracting the embedded GPP stubs library and setting up RPC&amp;nbsp;buffers).&lt;/li&gt;&lt;li&gt;I'm using the C6Run C I/O transport system to pass RPC buffers back&amp;nbsp;and forth, for now.&lt;/li&gt;&lt;li&gt;There's some additional parts in c6run-cc to handle the --rpc&amp;nbsp;switch (add the dsp stub file to the sources list, compile the gpp&amp;nbsp;stubs into a dynamic link library and embed it inside the final&amp;nbsp;executable)&lt;/li&gt;&lt;li&gt;Custom stubs have to be hand-coded, there's no stub generator tool yet&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Support for buffer parameters coming soon! (actually, if you write a&amp;nbsp;GPP side stub that does allocation from CMEM or POOL, use this RPC&amp;nbsp;call for allocating memory on the DSP and pass data in this buffer,&lt;br /&gt;everything should work).&lt;br /&gt;&lt;br /&gt;Comments, criticism and suggestions are very, very welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-1336777280678860927?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/1336777280678860927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/07/dsp-rpc-posix-initial-commit-is-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1336777280678860927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1336777280678860927'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/07/dsp-rpc-posix-initial-commit-is-in.html' title='DSP-RPC-POSIX initial commit is in place!'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6338221469486585894</id><published>2010-06-28T13:01:00.000+02:00</published><updated>2010-06-28T13:01:33.628+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #6</title><content type='html'>Weekly Report #6&lt;br /&gt;Submitted on 2010-06-28&lt;br /&gt;Covers 2010-06-21 to 2010-06-28&lt;br /&gt;Corresponding Draft Schedule Item:&lt;br /&gt;Create the RPC framework that can call functions on the GPP side from the DSP and return values back to the DSP. &amp;nbsp;Implement and unit-test the POSIX function wrappers according to the planned order.&lt;br /&gt;&lt;br /&gt;Status and Accomplishments&lt;br /&gt;DSP-&amp;gt;GPP RPC code is now integrated into the C6Run sources and works fine alongside with the regular C6RunApp C I/O calls. The RPC layer is compiled/linked together with the user-provided sources for now as putting them into the C6Run library caused some strange problems (see issues section).&lt;br /&gt;the GPP side RPC stubs are now compiled into a dynamically linked library (.so) and the GPP side server uses dlfcn functions (dlopen, dlsym..) to locate the function with the given name and invoke it. the stubs still pull the parameters from the buffer on their own - assembly code for automating this is still in the works&lt;br /&gt;&lt;br /&gt;Plans and Tasks&lt;br /&gt;finalize the GPP-side assembly function caller so that GPP side stubs don't need to be provided at all&lt;br /&gt;experiment with different combinations of parameters, including doubles/long integers and shared-mem allocated buffers to make sure everything is working correctly with the marshaller, DSP/Link transfers, unmarshaller and GPP-side server&lt;br /&gt;finalize the DSP-side stubs for the POSIX functions which don't take/return any buffers as parameters&lt;br /&gt;&lt;br /&gt;Risks, issues, blockers&lt;br /&gt;One strange thing that occured: if I compile the RPC marshalling function together with the user sources (thus having the RPC layer in the user code, since readmsg/writemsg is accessible from there) given to c6runapp-cc everything works fine, but when I try to include the functions in the DSP-side C6Run library, something goes wrong. The function is a variadic function whose definition looks like this:&lt;br /&gt;&lt;br /&gt;void rpc_marshal(char *function_name, char *function_signature, ...)&lt;br /&gt;&lt;br /&gt;When I compile the DSP side libs with this function inside, the parameters after (and including) the second parameter are not passed correctly. I've observed that even the address of the formal parameter goes awry. To illustrate, let's say I put a printf call inside this function (thanks to C6Run CIO :)):&lt;br /&gt;&lt;br /&gt;printf("Stack addresses: %x %x values: %s %s", &amp;amp;function_name, &amp;amp;function_signature, function_name, function_signature);&lt;br /&gt;&lt;br /&gt;If I compile and use this function alongside with the user-provided sources to c6runapp-cc, everything works correctly, so I get output that looks like this (I've made up the stack addresses but they were similar to these):&lt;br /&gt;&lt;br /&gt;printf("Stack addresses: 0x80000800 0x8000804 values: rpc_function iii@");&lt;br /&gt;&lt;br /&gt;but if used from inside the library:&lt;br /&gt;&lt;br /&gt;printf("Stack addresses: 0x80000800 0x80000854 values: rpc_function &lt;garbage&gt;");&lt;/garbage&gt;&lt;br /&gt;&lt;br /&gt;Not sure why this is happening - linker settings? a problem with passing variadic parameters? (since if I remove the ... at the end the two parameters get passed correctly, but of course then the others don't). Since it works fine if provided alongside user sources I decided to stick with that for now.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6338221469486585894?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6338221469486585894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-6.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6338221469486585894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6338221469486585894'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-6.html' title='GSoC Weekly Report #6'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-2602048836235659035</id><published>2010-06-21T12:57:00.000+02:00</published><updated>2010-06-21T12:57:44.515+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #5</title><content type='html'>&lt;b&gt;Weekly Report #5&lt;/b&gt;&lt;br /&gt;Submitted on 2010-06-21&lt;br /&gt;Covers 2010-06-14 to 2010-06-21&lt;br /&gt;Corresponding Draft Schedule Item:&lt;br /&gt;Create the RPC framework that can call functions on the GPP side from the DSP and return values back to the DSP. &amp;nbsp;Implement and unit-test the POSIX function wrappers according to the planned order.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;we now have a marshaller which takes a function name, signature and a variable number of arguments and packs them neatly into a buffer to be transferred via DSP/Link (as well as the corresponding unmarshaller :))&lt;/li&gt;&lt;li&gt;all DSP-side stubs are reduced to three lines: rpc_marshal, rpc_invoke and return result, quite suitable for automation&lt;/li&gt;&lt;li&gt;looked into shared memory issues some more without any fruitful effort; for now we'll enforce the user to pass buffer parameters allocated from shared areas only, and develop a better method later&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;unfortunately I managed to break C6RunApp's existing RTS I/O while trying to integrate the RPC server, I'll work on fixing this - it'll be nice to have both working, see issues section regarding possible shift of focus to general RPC instead of POSIX&lt;/li&gt;&lt;li&gt;the static jump table design used for resolving rpc calls on the GPP right now is awful, write an assembly function launcher similar to the one in C6RunLib&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;shared memory issues continue, but for now we can overlook them since we can force the user to pass only buffers allocated from shared areas (POOL or CMEM). PROC address translation is there but we have to avoid segfaults / protection issues, this'll need a bit more time&lt;/li&gt;&lt;li&gt;as I worked more and more with C6RunApp and the existing RTS C library implementation, I've realized that the available functionality is quite sufficient for prototyping purposes. so instead of replacing this with RPC POSIX calls, we can have both methods and leave the choice to the user. it also may be appropriate to shift the focus of the project on RPC issues, providing a library of examples which can be built up to useful code, or focusing on other ease-of-development issues.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-2602048836235659035?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/2602048836235659035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/2602048836235659035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/2602048836235659035'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-5.html' title='GSoC Weekly Report #5'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-816801624966047866</id><published>2010-06-18T12:34:00.001+02:00</published><updated>2011-04-23T19:29:07.557+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='dsplink'/><category scheme='http://www.blogger.com/atom/ns#' term='heterogenous multicore processing'/><title type='text'>A brief overview of RPC over multiple cores</title><content type='html'>RPC (which stands for &lt;i&gt;Remote Procedure Call&lt;/i&gt;) is defined as follows by Wikipedia:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;b&gt;Remote procedure call (RPC)&lt;/b&gt; is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction (...)&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Within our context of heterogenous OMAP3 multi-cores, it doesn't exactly refer to the same thing as it does in general, but still, there are enough familiarities. For example, the DSP and GPP use the same memory (ie, the DDR RAM on the Beagle) as main memory, but this doesn't make their address spaces the same - to start with, the DSP works with physical addresses whereas the GPP works with logical ones. And the binaries are obviously not compatible since we have two different processors and architectures (hence the "heterogenous" in "heterogenous multicore processing"). If we want the GPP and DSP to co-operate towards the same goal (especially in situations like video decoding which we'd really appreciate the DSPs help), it would be useful to get them to talk to each other without much effort. The DSP should be able to easily obtain the data it needs to work with (which usually resides in the GPP file system or program memory), process it and hand it back to the GPP.&lt;br /&gt;&lt;br /&gt;While all of this is quite feasible as of the moment, doing something like this is far from trivial (set up OE, build DSP/Link, examine the examples, learn the DSP/Link API, set up the GPP side structures for bringing up the DSP, try to get the DSP things working without being able to see what you're doing &lt;i&gt;unless you have CCS or are using C6RunApp ;) &lt;/i&gt;and so on...). And DSP side code &lt;i&gt;is C code.&lt;/i&gt;&amp;nbsp;TI's CGT6000 is a &lt;i&gt;C compiler.&lt;/i&gt;&amp;nbsp;You could essentially write the same things and compile/run on either side. Why all this hassle? Why not be able to pass parameters and call functions from one side to the other? Why not live in harmony and peace? &lt;b&gt;Then RPC is the answer!&lt;/b&gt; (maybe except that last one).&lt;br /&gt;&lt;br /&gt;Scrolling down the Wikipedia article, we see the steps involved in making RPC work; and it's rather trivial to see these from a DSP to GPP RPC point of view. Let's say we have this function &lt;b&gt;int gpp_side_function(int param1, float param2, char *param3) &lt;/b&gt;somewhere in the GPP side, which we want to call from the DSP.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The client (DSP in our case) calls the Client stub, which has the same definition. The call is a local procedure call, with parameters pushed on to the stack in the normal way.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The client stub packs the parameters into a message (done according to some predefined structure, e.g 2 bytes function name length, n bytes function name, then 2 bytes parameter count, then each of the parameters with their lengths, etc.) and making a system call to send the message. In our case, sending the message is putting a message on the DSP-&amp;gt;GPP MSGQ. Packing the parameters is called &lt;i&gt;marshaling&lt;/i&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The server (the GPP side in our case) receives the message, unpacks (&lt;i&gt;unmarshals&lt;/i&gt;) it and locates the corresponding local function call stub.&lt;/li&gt;&lt;li&gt;Finally, the server stub calls the desired procedure. The reply traces the same in other direction.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Similarly, one could to GPP-&amp;gt;DSP RPC calls - a component of the C6Run project called C6RunLib is meant for this purpose.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are certain implementation details that need special attention in our case:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;Passing Pointers as RPC Parameters&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Since the addressing mechanism of the GPP and DSP are different, we need to make sure that any pointer parameters / buffers which are passed are accessible from both sides. When doing GPP-&amp;gt;DSP calls, one can use the CMEM module to obtain a shared region of memory and translate the addresses forth and back to ensure mutual accessibility, but there is no CMEM interface on the DSP side, thus one must resort to workarounds. If the size of the buffer parameters is always available, one can pass the contents of the buffers themselves back and forth via DSP/Link. One approach could be using the DSP/Link POOL module which allocates shared buffers and provides address translation, though this will not be suitable for large amounts of memory usage since there is a limited number of constant-sized POOL buffers. Another could be using a special protocol to access the CMEM interface on the GPP side and doing all the allocation from there, but both in this case and the POOL buffer case we have to ensure the passed pointer parameters are allocated with our special method and not from the DSP stack region, otherwise we'll be in trouble.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;Openness to Expansion&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Having a RPC framework that can only call 5 (or 50, or 100) predefined functions on the other side is not very useful, one wants to be able to define and call one's own functions. And to be able to do this, the framework must not have too many hardcoded details such as when to do the address translations mentioned above. To address this, I'm using a function signature system in my implementation to be able to identify parameter types and where special attention is needed. For example, for our above function&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int gpp_side_function(int param1, float param2, char *param3)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;the corresponding signature would be&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;iif@&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;where the first symbol identifies the return type as an integer, and the other three identify parameter types. The final @ indicates that some manner of address translation (or passing the buffer back/forth, if that's the preferred approach) is needed: the marshaler may take care of the translation before passing the message, or the server stub may do the translation itself, depending on how the protocol is defined.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, I've designed the marshaler itself to be as user-friendly as possible - let's say you want to provide the DSP side function stub for the above function. All you have to do is pass the function name, function signature (which can be extracted via a simple lookup table) and all the parameters to the marshaller, prompt the data transfer, and return the result with the desired data type. So the stub for the above function would look like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int gpp_side_function(int param1, float param2, char *param3)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rpc_marshal("gpp_side_function", "iif@", param1, param2, param3);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rpc_makecall();&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return RPC_GETRESULT(int);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The process is quite suitable for automation, and I'm planning to have a script that auto-generates the stubs given the definitions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;Finding and invoking the corresponding GPP stub&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It's easier said than done - so you have a string giving you the GPP-side function name and a bunch of parameters. How do you locate the corresponding function, and how do you actually make the function call? So far, I've been thinking of these approaches:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;Use a static jump table. &lt;/i&gt;An intuitive albeit not-so-elegant solution. Associate each function name with a number (perhaps via hashing?), and use a function pointer table to jump to the stub. The stub has to take care of the parameter demarshaling and passing the parameters. A static approach, so one has to add the table entry as well as the GPP-side stubs.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Use an assembly function caller. &lt;/i&gt;Once we are able to decode the function address (perhaps statically as in 1, perhaps via dynamic loading with libdl functions) we can have an assembly routine which pushes the parameters onto the stack and call the function living at the located address. This is what C6RunLib uses, and will be the eventually preferred method.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-816801624966047866?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/816801624966047866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/brief-overview-of-rpc-over-multiple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/816801624966047866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/816801624966047866'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/brief-overview-of-rpc-over-multiple.html' title='A brief overview of RPC over multiple cores'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-3771375292467458826</id><published>2010-06-14T10:22:00.000+02:00</published><updated>2010-06-14T10:22:35.092+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #4</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 17px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Weekly Report #4&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Submitted on 2010-06-14&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Covers 2010-06-07 to 2010-06-14&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Corresponding Draft Schedule Item:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;Familiarize with DSP/BIOS Link and its various modules. Experiment with GPP-DSP communication and compilation processes to identify potential issues and useful features. Review existing RPC protocols and create one suitable for DSP-GPP communication over DSP/BIOS Link.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;My exchange period in Sweden ended and I had to move back to Turkey, so couldn't really get as much work done as I'd like to, but now I have access my evil scientist laboratory headquarters :) I'll be based here for the rest of the summer.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;I now have an RPC implementation for DSP-&amp;gt;GPP calls, composed of four parts: DSP-side function stubs, DSP-side marshaller/unmarshaller and transport functions, GPP side marshaller/unmarshaller and transport functions, and GPP side stubs/invokers. No dynamic loading on the GPP side, the invocation is a simple static jump table and there's no support for pointer parameters but it works fine otherwise.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;had some time to play around with kernel module loading. didn't really discover anything groundbreaking, but noticed that C6Run doesn't work with the *.ko's that came with my&amp;nbsp;Ångström. probably version differences which won't be an issue if one builds C6Run libraries and the distro itself using OpenEmbedded, but in the other case we could have a config file on the Beagle which points to the appropriate module filenames, and load these ones at startup instead.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;right now the stubs are doing most of the work for marshalling, this will make it difficult to add new RPC functions in the future. have a marshaller that can pack variable number of parameters into the data, I've already have had some success with this. I'm planning to have a string "function signature" for each stub, and feed this along with all the parameters to the marshaller. bad idea? should each stub keep doing its own packing to increase efficiency?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;passing pointer parameters is still a big issue due to memory sharing, we have to make sure that any direct memory pointers are mutually accessible after address translation, look into this.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;finalize and commit my initial group of DSP-side wrappers with integer parameters and return types (mostly is*() functions from ctype.h)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Memory issues still here:&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;span style="font-style: normal;"&gt;&amp;nbsp;C6RunLib can utilize the CMEM interface to get DSP-GPP shareable contiguous memory regions, but there is no CMEM on the DSP side - what'll be the cure for this? force allocating everything from POOL buffers if they are to be passed as RPC parameters? set the DSP linker parameters to allocate the heap from a pre-determined shared region and do the address translation manually? copy and back-copy the DSP-side buffers manually into/out of the message buffers during marshalling and unmarshalling (but how do we know the size of a void* buffer, for example?)?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-3771375292467458826?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/3771375292467458826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3771375292467458826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3771375292467458826'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-4.html' title='GSoC Weekly Report #4'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-1366203987573531929</id><published>2010-06-09T17:25:00.000+02:00</published><updated>2011-04-23T19:29:07.559+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='c6runapp'/><title type='text'>C6RunApp and DSP-RPC-POSIX</title><content type='html'>Now we've looked into how C6RunApp works in general, it's time to bring DSP-RPC-POSIX into the picture. Although the project builds largely on top of C6RunApp in general, there are two keywords in the name which hint into a different direction:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;RPC: &lt;/b&gt;the project aims to bring a fully functional RPC (Remote Procedure Call) framework into the picture in the sense that GPP-side procedures are remote procedures when viewed from the DSP side. In other words, the DSP will be able to call any GPP-side function using this component. Note that there already exists a limited form of RPC in the existing C6RunApp structure, but only for the file system access calls.&lt;/li&gt;&lt;li&gt;&lt;b&gt;POSIX: &lt;/b&gt;using the RPC component, the GPP-side POSIX library will be made accessible from the DSP side.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;At this point, the question "but the RTS lib already provides POSIX functionality! why's a RPC POSIX layer necessary?" may come up. These were my primary reasons for going in this direction while writing my project proposal:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;being able to offer the already stable GPP-side POSIX libraries with no extra effort required&lt;/li&gt;&lt;li&gt;have greater flexibility for expansion since it can eventually be used to call any GPP-side function, such as writing to the frame buffer or user-defined functions.&lt;/li&gt;&lt;li&gt;although the DSP is an indeed powerful processor it is not meant for general computing, so it's not practical for, for example, string processing while formatting printf strings - this is a task better done by the GPP&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Right now, I'm still experimenting with RPC-related tasks such as packing ("marshalling") and extracting ("unmarshalling") a variable number of arguments into/out of messages and dynamic loading, but the first wrappers should be appearing quite soon :)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-1366203987573531929?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/1366203987573531929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/c6runapp-and-dsp-rpc-posix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1366203987573531929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1366203987573531929'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/c6runapp-and-dsp-rpc-posix.html' title='C6RunApp and DSP-RPC-POSIX'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-1036152998994715963</id><published>2010-06-09T01:11:00.000+02:00</published><updated>2011-04-23T19:29:07.560+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsp-rpc-posix'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='dsplink'/><category scheme='http://www.blogger.com/atom/ns#' term='c6runapp'/><category scheme='http://www.blogger.com/atom/ns#' term='dsp'/><title type='text'>C6RunApp</title><content type='html'>In my blog post entitled (rather appropriately, in my opinion :)) Moment of Truth #1, I had briefly mentioned what C6RunApp allows you to do - you write C code in the conventional way you would for the ARM (including things like debug outputs with printf or data input with scanf), and then use the C6RunApp script to get an ARM executable which actually runs everything you wrote on the DSP (except things that require access to the ARM side itself, but we'll get to that in a moment).&lt;br /&gt;&lt;br /&gt;First, let's make a mention of the DSP RTS library as it's a relevant component on which C6RunApp itself builds on. The TI CGT (which stands for Code Generation Tools and is essentially the DSP side compiler, linker and other binary utilities) C6000 contains a library of standard C functions which is aptly called the Run Time Support (RTS) library. As you would expect from such, it contains implementations of regularly used C lib functions such as printf and scanf. But of course, the problem is not writing C lib function implementations on the DSP (which is quite a capable processor) - it's things that actually require GPP side capabilities such as file system access (which in turn can also provide console input and output). The implementations of these functions in the RTS use a number of base lower-level functions (such as open, close, read and write) to carry out the needed GPP side communication, which can be user-defined. For example, if one is using the CCS (Code Composer Studio) for the development process, CCS has the driver which provides the communication between the host which is running the development environment and the DSP, so that you can see the terminal output and access local files.&lt;br /&gt;&lt;br /&gt;Of course, this is not a very convenient scenario as we are dependent on the CCS for file system access. Why not just the GPP side OS (that is, the&amp;nbsp;Ångström distribution) instead? This is one of the underlying ideas for C6RunApp: we have a host application on the GPP side which recieves requests over DSP/Link, performs the necessary file system calls, and passes back the results over to the DSP again. Another idea is that the GPP host app takes care of setting up the DSP/Link and loads the DSP with the DSP-side executable without any effort from the user. Combining these two ideas that provide us with "verbose" DSP side programs and abstract away the details of DSP/Link, we get easier DSP side development - we get C6RunApp!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;C6RunApp Workflow&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;So what happens when you want to compile hello_world.c using the C6RunApp cross-compiler script? Let's have a look here first, and then we'll examine the involved libraries in some more detail. This is what the C6RunApp readme file has to say on the subject (with some small clarifications from me):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The DSP tools are used to build the supplied source and link it against&amp;nbsp;the prebuilt C6RunApp DSP-side library. &amp;nbsp;The result is the complete DSP-side executable&amp;nbsp;image in standard TI COFF format.&lt;/li&gt;&lt;li&gt;The DSP executable image is minimized in size by using the symbol stripping tool,&amp;nbsp;strip6x.&lt;/li&gt;&lt;li&gt;The contents of the stripped DSP executable file are converted to a C byte array&amp;nbsp;in a temporary C header file. &amp;nbsp;This header file is referenced by the main GPP-side&amp;nbsp;C6RunApp loader, and thus the DSP executable image will be embedded into the final resulting GPP executable.&lt;/li&gt;&lt;li&gt;The main C6RunApp loader program is built using the ARM cross compiler tools, including&amp;nbsp;the DSP-side executable inside of the binary ARM ELF executable. &amp;nbsp;This ARM executable&amp;nbsp;is the same name as specified on the command line of the C6RunApp cross-compiler script.&lt;/li&gt;&lt;li&gt;Once the GPP executable is ran, it sets up the DSP/Link, loads the DSP with the in-built DSP executable and initializes needed communication channels (namely, constructing the GPP-&amp;gt;DSP message queue and locating the DSP-&amp;gt;GPP message queue).&lt;/li&gt;&lt;li&gt;The GPP executable waits for the DSP to send it file system call requests, performs the requested ones and sends back the results, until it receives a signal that it can terminate.&lt;/li&gt;&lt;li&gt;Teardown is performed on the DSP/Link setup and the DSP is cleanly shut down.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;C6RunApp Components&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let's have a look at the pieces of which C6RunApp consists:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;The DSP side library,&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;b&gt;C6RunApp_dsp.lib&lt;/b&gt;&lt;/i&gt; - the library which the user-provided code is linked against, contains entry and exit points for the DSP/BIOS, initializes the communication channels and starts running the user-defined main(). It provides implementations of &lt;b&gt;writemsg&lt;/b&gt; and &lt;b&gt;readmsg&lt;/b&gt; which the DSP RTS lib bases the low-level communications on. These implementations pass the requested function call to the GPP via the message queue and read back the result in the same manner.&lt;/li&gt;&lt;li&gt;&lt;b&gt;The GPP side library,&amp;nbsp;&lt;i&gt;C6RunApp_gpp.lib&lt;/i&gt; - &lt;/b&gt;the library that contains the functions which serve the DSP's C I/O requests.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;The GPP main object,&amp;nbsp;&lt;i&gt;C6RunApp_load.o&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&lt;/span&gt;- &lt;/b&gt;once the DSP side executable is created and turned into a header file, the binary object C6RunApp_load.o is linked against the GPP side library to create the final GPP executable&lt;/li&gt;&lt;li&gt;&lt;b&gt;The kernel modules - &lt;/b&gt;not really components so much as dependencies. C6RunApp utilizes &amp;nbsp;CMEM for the initial loading of the DSP executable, the LPM to do a clean shutdown of the DSP as is needed on OMAP3530s, and the DSP/Link module for some obscure purpose :)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Hopefully this will have provided some insight into how the magic of C6RunApp works - coming up next (but sooner this time!) is where my GSoC project DSP-RPC-POSIX fits in with all of this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-1036152998994715963?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/1036152998994715963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/c6runapp.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1036152998994715963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/1036152998994715963'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/c6runapp.html' title='C6RunApp'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-8099978713672942305</id><published>2010-06-07T11:41:00.001+02:00</published><updated>2010-06-07T11:44:08.522+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #3</title><content type='html'>&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Weekly Report #3&lt;/b&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Submitted on 2010-06-07&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Covers 2010-06-01 to 2010-06-07&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Corresponding Draft Schedule Item:&lt;/b&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;Familiarize with DSP/BIOS Link and its various modules. Experiment with GPP-DSP communication and compilation processes to identify potential issues and useful features. Review existing RPC protocols and create one suitable for DSP-GPP communication over DSP/BIOS Link.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Status and Accomplishments&lt;/b&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;more  experimentation with DSP/Link APIs and general reading especially  for the DSP side arch — I feel confident and comfortable enough to  seriously start working&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;studied  the C6RunLib source code for inspiration on RPC calls and got some —  but I still have doubts on implementing the exact same system, see  issues section below&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;experimented  with some GPP-side tasks which can be of use for the RPC framework  such as passing a variable number of parameters to functions and  methods for dynamic and static linking to dynamic link libraries&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;did  some basic RPC tests using the existing C6RunApp writemsg/readmsg  architecture, all went well (nothing fancy — was mainly for the  purpose of testing my understanding of how things work)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;looked  for existing statistics and similar documentation on which POSIX  functions are the most commonly used without any luck...decided to  follow a C standard library reference documentation and start with  the simpler functions, see plans and tasks section below&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;finalize  and make a working draft of the RPC system — possibly without  dynamic loading on the GPP side at this stage, which can be added  later on&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;finalize  blog post on C6RunApp architecture and how DSP-RPC-POSIX fits in —  hoping that increasing awareness will stir more interest&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;write  the first wrapper(s) for the DSP side, starting with noncomplex (in  terms of having a constant number of basic non-pointer parameters)  functions (e.g putchar())&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;experiment  a little with possibilities of user-friendly features such as  checking and auto loading of kernel modules at program startup and  catching Ctrl-C signals to perform DSP side cleanup before exiting&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="LEFT" style="margin-bottom: 0.19in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;span style="font-style: normal;"&gt;I  want the RPC system to eventually work with any user-defined GPP  side function (not just C I/O) without much hassle, and I believe  dynamic library loading will be necessary for this (ie, given the  function name, parameter type list and library name, be able to  locate the function and call it on the GPP side). I realize this can  be done by preprocessing the source code and adding the function  defs before compiling but I'm curious if it can be done at runtime  as well. C6RunLib uses this preprocessing method (via perl scripts)  but in that case we provide and therefore have access to source code  of all the possible RPC fxns anyway&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="background-attachment: scroll; background-clip: initial; background-color: white; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;"&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Memory  issues continued:&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: arial, sans-serif;"&gt;&lt;span style="font-style: normal;"&gt;  Is it a really good idea to do RPC GPP calls for functions that take  pointers as parameters and modify the pointer data, like malloc()  and memset() ? They're already present and working in the DSP RTS  libs, so is it necessary? If so, we could do address translation  before calling the actual GPP side function, can we ensure that the  memory is mutually accessible by the processors by doing all  allocation from POOL buffers? The issue eventually extends to any  function that takes a pointer parameter.. I'd appreciate some  broader-perspective views on this subject.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-8099978713672942305?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/8099978713672942305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8099978713672942305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8099978713672942305'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/gsoc-weekly-report-2.html' title='GSoC Weekly Report #3'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6858598802548345461</id><published>2010-06-02T11:05:00.000+02:00</published><updated>2011-04-23T19:29:07.561+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='dsplink'/><title type='text'>A bit more about DSP/Link</title><content type='html'>My original plan for this particular blog post was to do a write-up on what the OMAP3530 multicore architecture looks like, where the DSP sits in this picture, how DSP/Link comes into play and what it can do for us. But then again, I noticed the document which I learned most of these thing from is an excellent source of information and doesn't really need a re-write, so I'm just going to offer my salutations to the ETH PIXHAWK MAV project and invite you to &lt;a href="http://pixhawk.ethz.ch/tutorials/omap/dsplink_api"&gt;read their excellent DSP/Link API guide&lt;/a&gt; :)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Coming up soon: how C6RunApp works, and how my project DSP-RPC-POSIX will fit in it to take things a bit further.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6858598802548345461?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6858598802548345461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/06/bit-more-about-dsplink.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6858598802548345461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6858598802548345461'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/06/bit-more-about-dsplink.html' title='A bit more about DSP/Link'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6781966741261657525</id><published>2010-05-31T01:05:00.002+02:00</published><updated>2010-05-31T01:05:26.719+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='weekly report'/><title type='text'>GSoC Weekly Report #2</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Weekly Report #2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Submitted on 2010-05-31&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;i&gt;Covers 2010-05-23 to 2010-05-31&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Corresponding Draft Schedule Item:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;Familiarize with DSP/BIOS Link and its various modules. Experiment with GPP-DSP communication and compilation processes to identify potential issues and useful features. Review existing RPC protocols and create one suitable for DSP-GPP communication over DSP/BIOS Link.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;Status and Accomplishments&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;initially built DSP/Link module and examples using OpenEmbedded&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;modified DSP/Link examples and built them using the ti-devshell script with the OE toolchain&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;successfully compiled and tried out C6RunApp on the BeagleBoard, using both OE and CodeSourcery toolchains&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;created the dsp-rpc-posix branch at http://gforge.ti.com/svn/dspeasy/C6RunApp/branches/dsp-rpc-posix (no commits yet, though)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;did some more studying of the C6RunApp source code, better understanding when one sees it in action&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Plans and Tasks&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;more experimentation with DSP&amp;lt;-&amp;gt;GPP communication and especially with DSP side code&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;benchmark some DSP/Link on the Beagle, mainly NOTIFY and MSGQ, may be useful to have numbers around&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;study how C6RunLib does RPC calls from GPP to DSP to get some inspiration for implementing the reverse&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;come up with a finalized list for the order in which the POSIX wrappers will be written&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;b&gt;Risks, issues, blockers&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;&lt;i&gt;probably not an issue but worth a mention&lt;/i&gt;: the speed at which DSP/Link conveys messages and notifications may have a performance impact, but this isn't expected to be a major issue since the primary goal is easy prototyping on the DSP anyway&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;how best to determine which C standard library functions are used the most often / are the most useful? (aside from personal experience) statistics? polls?&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;the original project definition contains a few too many references to POSIX - Daniel Allred pointed out that there are many fine details and many, many functions in the standard itself. full POSIX compatibility could be an eventual goal (but why full compliance is such a good idea is open to discussion) but it looks wiser and more productive to start and progress with commonly used / useful functions.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;providing easier prototyping will lower the entry level and this may, in turn, mean there will be more inexperienced behavior regarding the dsp. some basic "baby-sitting" (perhaps checking/loading the needed kernel modules automatically at the app startup, and catching Ctrl-C signals so we can cleanup before the exit) may be necessary.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;DSP works with physical addresses, while the GPP works with virtual ones. what if the user wants to print a string which is allocated from the DSP heap? the issue can be handled by copying buffers to POOL buffers and passing them in this manner (this is what C6RunApp currently does) but the issue itself is worth further investigation. is there a better approach? will POOL buffer copying be sufficient, or is there something it won't be able to handle correctly?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6781966741261657525?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6781966741261657525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/gsoc-weekly-report-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6781966741261657525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6781966741261657525'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/gsoc-weekly-report-2.html' title='GSoC Weekly Report #2'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6039478058766411459</id><published>2010-05-27T23:53:00.000+02:00</published><updated>2011-04-23T19:29:07.562+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='openembedded'/><category scheme='http://www.blogger.com/atom/ns#' term='dsp/link'/><category scheme='http://www.blogger.com/atom/ns#' term='ti-devshell'/><title type='text'>Modifying the DSP/Link examples and utilizing OE toolchains outside OE</title><content type='html'>Now that we got OE to build the DSP/Link kernel module and examples for us, we'll probably want to do some tinkering with the sample applications to feel more comfortable with DSP/Link - one may just as well start from scratch, but it definitely won't be as easy as modifying the existing examples.&lt;br /&gt;&lt;br /&gt;You should be able to find the dsplink source tree at&lt;br /&gt;&lt;br /&gt;~/oe/setup-scripts/build/tmp-angstrom_2008_1/sysroots/beagleboard-angstrom-linux-gnueabi/usr/share/ti/ti-dsplink-tree/packages/dsplink&lt;br /&gt;&lt;br /&gt;and under this directory, you'll find the two directories for the sample sources, namely gpp/src/samples for the GPP-side code of the samples, and dsp/src/samples for the DSP-side. The source codes found in these directories themselves is quite interesting to study to learn how DSP/Link and its components are used, and I've heard that actually tinkering with things allows you to learn much faster *wink wink*.&lt;br /&gt;&lt;br /&gt;The thing is, once you have modified the sources, it's not very straightforward to re-compile them as they're part of the DSP/Link make system. Here one can utilize OpenEmbedded's environment to make this go a bit more smoothly.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The ti-devshell recipe &lt;/b&gt;generates a shell script which you can run to become bitbake. Well, maybe not become bitbake, but it'll export all the related environment variables for you once you run it, which will make life much easier. One thing before baking the actual recipe that you may want to do is, check the ti-devshell.bb recipe file and see if it contains this line:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;PACKAGE_ARCH = "${MACHINE_ARCH}"&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;if it doesn't, you can just add it somewhere near the top - it'll be generating incorrect paths for the ti- thingies otherwise. &lt;i&gt;Koen mentioned that this is needed due to some hack the ti- recipes are using.&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;After &lt;b&gt;bitbake ti-devshell &lt;/b&gt;you'll end up with a shell script in the OE deploy/addons directory. Try running this script and typing in &lt;b&gt;env &lt;/b&gt;to get an idea how much it does for you :)&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;The part that comes now was inspired by how the ti-dsplink.bb recipe does things - it's highly recommended that you examine the file yourself.&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Next, go into the dsplink source directory by issuing &lt;b&gt;cd $LINK_INSTALL_DIR&lt;/b&gt;. There's one particular environment variable that the script doesn't set, so &lt;b&gt;export DSPLINK=$LINK_INSTALL_DIR/dsplink&lt;/b&gt;. Find the config script under config/bin in the dsplink directory, and execute this to configure the DSP/Link make system:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;perl dsplinkcfg.pl --platform=OMAP3530 --nodsp=1 --dspcfg_0=OMAP3530SHMEM --dspos_0=DSPBIOS5XX --gppos=OMAPLSP --comps=ponslrmc&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;What was that bunch of parameters? You can run the script without any arguments and it'll describe each of them for you, along with the choices you have. Following the default settings (ie the ones I mention above) is highly recommended though.&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Just two steps away from completion...there's some more bitbake-inspired environment variables to be set - &lt;i&gt;beware that these represent my particular paths with the OE root located at ~/oe.&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;export TARGET_PREFIX=arm-angstrom-linux-gnueabi-&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;export TOOLCHAIN_PATH=~/oe/setup-scripts/build/tmp-angstrom_2008_1/cross/armv7a&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;export TARGET_SYS=arm-angstrom-linux-gnueabi&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;export STAGING_KERNEL_DIR=~/oe/setup-scripts/build/tmp-angstrom_2008_1/sysroots/beagleboard-angstrom-linux-gnueabi/kernel&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Finally, go into the gpp/src/samples directory and...&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 13px;"&gt;make BASE_TOOLCHAIN="${TOOLCHAIN_PATH}" BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" OSINC_PLATFORM="${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" CROSS_COMPILE="${TARGET_PREFIX}" CC="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc" LD="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc" AR="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}ar" COMPILER="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc" LINKER="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc" ARCHIVER="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}ar" KERNEL_DIR="${STAGING_KERNEL_DIR}" all&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;it's just ripped off from the OE dsp/link recipe, it should be just fine to copy-paste it into your terminal as it's pretty neutral with a lot of environment variables (which we already defined in the previous step). You can repeat the same make comand in dsp/src/samples to build the DSP-side code as well, all of which will end up in the gpp/BUILD and dsp/BUILD directories.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6039478058766411459?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6039478058766411459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/modifying-dsplink-examples-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6039478058766411459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6039478058766411459'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/modifying-dsplink-examples-and.html' title='Modifying the DSP/Link examples and utilizing OE toolchains outside OE'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-8611340398190303596</id><published>2010-05-27T00:31:00.000+02:00</published><updated>2011-04-23T19:29:07.563+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><title type='text'>Moment of Truth #1: Hello World from the DSP with C6RunApp</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_988HDVUXZuY/S_2d81SdgyI/AAAAAAAACqU/_j4TgePtUb0/s1600/c6run_helloworld_screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_988HDVUXZuY/S_2d81SdgyI/AAAAAAAACqU/_j4TgePtUb0/s320/c6run_helloworld_screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;i&gt;O World, behold the C6RunApp saying Hello to Thee!&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;a href="https://gforge.ti.com/gf/project/dspeasy/"&gt;C6RunApp&lt;/a&gt;&amp;nbsp;(formerly known as DSPEasy) is an awesome cross-compiling tool that I'll be basing my work on. What it allows you to do is basically this: you write your 5-line run-of-the-mill Hello World application in plain old C, then call the cross-compiling script on this file as you would call gcc to produce the hello_world_dsp executable you see above. The executable itself is (obviously) an ARM executable, but when you run it it magically extracts the compiled DSP binary from within itself, takes care of all the tedious work of setting up the communications via DSP/Link, and services some C I/O (such as printf) on request from the DSP. Now imagine this with the full capabilities of the standard C library we know and &lt;i&gt;love&lt;/i&gt;, not to mention the eventual ability to connect to &lt;i&gt;any&lt;/i&gt;&amp;nbsp;ARM-side function. Wouldn't it be lovely to do DSP development like this?&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;Coming soon: Developing for the DSP, using the OE toolchain to build modified DSP/Link samples, setting up C6RunApp and much more!&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-8611340398190303596?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/8611340398190303596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/moment-of-truth-1-hello-world-from-dsp.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8611340398190303596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8611340398190303596'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/moment-of-truth-1-hello-world-from-dsp.html' title='Moment of Truth #1: Hello World from the DSP with C6RunApp'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_988HDVUXZuY/S_2d81SdgyI/AAAAAAAACqU/_j4TgePtUb0/s72-c/c6run_helloworld_screenshot.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-271761875315671612</id><published>2010-05-26T20:12:00.001+02:00</published><updated>2011-04-23T19:29:07.564+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='dsplink'/><category scheme='http://www.blogger.com/atom/ns#' term='openembedded'/><category scheme='http://www.blogger.com/atom/ns#' term='beagleboard'/><title type='text'>Building DSP/Link with OpenEmbedded</title><content type='html'>I'll be shortly making a post about how the traditional DSP development cycle with DSP/Link works to further emphasize why C6Run and DSP-RPC-POSIX (that'd be my GSoC project's name :)) are needed. But before that, I though I'd talk a little about setting up DSP/Link &lt;i&gt;-which is a vital component for doing DSP development on OMAP3530 in the preferred way- &lt;/i&gt;using OpenEmbedded.&lt;br /&gt;&lt;br /&gt;Start off by building the ti-dsplink recipe:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;bitbake ti-dsplink&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;(if, for some reason, you want only the kernel module for dsplink, you can use the ti-dsplink-module recipe instead - the ti-dsplink recipe contains both the module and the samples)&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;This should result in several package files in your OE deployment directory (something like ~/oe/setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/ipk), which can be transferred to your Beagle (by directly copying them to the SD, by networking, by nfs...the options are endless - I personally mount the beagle via sshfs on my host machine) and then installed with &lt;b&gt;opkg install &lt;package_name&gt;&lt;/package_name&gt;&lt;/b&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;That's all there is to building and install DSP/Link, really! You can invoke the provided examples by cd'ing into /usr/share/ti/ti-dsplink-examples and then:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;./ti-dsplink-examples-loadmodules.sh&lt;/b&gt; to load the kernel modules. Note that you should have your bootargs configured to leave several megabytes of memory to the DSP/Link module. You may get a warning on the newer Beagles with 256 megs of RAM even if your bootargs are configured correctly, since the script just checks if you have more than 126 megs allocated for the kernel, so no panic.&lt;/li&gt;&lt;li&gt;&lt;b&gt;./ti-dsplink-examples-run.sh &lt;/b&gt;to run all the examples with some default parameters - you can examine the contents of this file to see how particular examples are invoked. Aside from the second parameter (which is the DSP executable name) and the last (which is the DSP ID), playing around with the parameters should be safe.&lt;/li&gt;&lt;li&gt;&lt;b&gt;./ti-dsplink-examples-unloadmodules.sh &lt;/b&gt;to optionally unload the modules once you're done.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-271761875315671612?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/271761875315671612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/building-dsplink-with-openembedded.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/271761875315671612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/271761875315671612'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/building-dsplink-with-openembedded.html' title='Building DSP/Link with OpenEmbedded'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-3386208589269503610</id><published>2010-05-24T21:28:00.002+02:00</published><updated>2011-04-23T19:29:07.566+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gzip'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='crc error'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Getting a working gzip</title><content type='html'>I've previously mentioned that the current version of gzip that ships with Ubuntu 10.04 is broken, among some other distros. I've also mentioned a manual workaround with the gzip recovery tools, but for several reasons (&lt;i&gt;such as not wanting to do the same damn sequence of actions, md5 and sha256 calculations and recipe updating while building things with OpenEmbedded!&lt;/i&gt;) one may want to fix those annoying crc error / unexpected end of file error's once and for all.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download the gzip-1.4 package from &lt;a href="ftp://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Extract into folder of your choice, I used ~/gzip-1.4&lt;/li&gt;&lt;li&gt;Open the terminal and cd into the extraction folder&lt;/li&gt;&lt;li&gt;Run &lt;b&gt;./configure&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Run &lt;b&gt;make&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Run &lt;b&gt;sudo make install&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;And now you have the gzip-1.4 binaries installed on your system, which should take care of the gzip crc errors.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-3386208589269503610?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/3386208589269503610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/getting-working-gzip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3386208589269503610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3386208589269503610'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/getting-working-gzip.html' title='Getting a working gzip'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-3806933961381583475</id><published>2010-05-24T21:22:00.001+02:00</published><updated>2010-05-26T20:16:04.232+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='report'/><title type='text'>GSoC Weekly Report #1</title><content type='html'>Here's my first weekly report on my GSoC work. My dear visitors will probably want to skip to parts 2 and 3 since the first part contains mostly my ramblings about OpenEmbedded, which you've already read.&lt;br /&gt;&lt;br /&gt;I'll promise it'll be shorter and easier to read the next time - but well, here goes :)&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;1) Setting up OpenEmbedded&lt;br /&gt;&lt;br /&gt;Since the GSoC coding begins officially on 24th of May, and also since&lt;br /&gt;I'm required to be very familiar with the development environment if I&lt;br /&gt;want to be able to make life easier for DSP developers who'll be&lt;br /&gt;working in the same environment, I was suggested to concentrate mainly&lt;br /&gt;on setting up the OpenEmbedded toolchain correctly and build some of&lt;br /&gt;the DSP/Link-related recipes. My initial experience with the setup was&lt;br /&gt;rather frustrating, and it's slightly ironic that this occured not&lt;br /&gt;because of lack of information on the topic, but due to too much&lt;br /&gt;outdated/irrelevant information which is spread around the net, on the&lt;br /&gt;wikis, etc. I initially tried out manually building the stable/2009&lt;br /&gt;branch and learned that this branch was way too outdated. I then tried&lt;br /&gt;setting up the apt-get'able OE and building the dev branch, which I've&lt;br /&gt;had some success with and made a blog post to talk about the issues I&lt;br /&gt;ran into during the process, only to find out later by Koen's mail&lt;br /&gt;that the apt-get'able OE is somehow broken by design and the Ångström&lt;br /&gt;setup scripts are *the* preferred way of doing things. As of the time&lt;br /&gt;of reporting, I've successfully set up my devenv using the setup&lt;br /&gt;scripts, but I honestly think that the visibility of these scripts&lt;br /&gt;needs to be improved in the community provided documentation.&lt;br /&gt;&lt;br /&gt;2) Familiarization with DSP/Link and the existing C6Run code&lt;br /&gt;&lt;br /&gt;I should first mention that I haven't been able to spend as much time&lt;br /&gt;on this subject as I would have liked to, since I was practically&lt;br /&gt;struggling with the OE setup during the whole week. I had already&lt;br /&gt;compiled DSP/Link and the sample applications using the CodeSourcery&lt;br /&gt;toolchain and gone through parts of the DSP/Link API documentation,&lt;br /&gt;but I still had a long way to go towards being able to use this&lt;br /&gt;knowledge practically, thus I spent some more time on reading&lt;br /&gt;documentation and source code. Aside from the DSP/Link User Manual and&lt;br /&gt;the provided samples, I found the tutorials and documentation on the&lt;br /&gt;ETH PIXHAWK (Computer Vision on Micro Air Vehicles) very helpful.&lt;br /&gt;After these I went through the C6RunApp (formerly DSPEasy) source code&lt;br /&gt;and I now do feel that I have sufficient practical understanding of&lt;br /&gt;the DSP/Link architecture in general and how C6RunApp works in&lt;br /&gt;specific to be able to start experimenting with GPP-hosted DSP-side&lt;br /&gt;calls. This week I'll be trying to get C6Run to build using the OE&lt;br /&gt;toolchain and play around with the PROC, NOTIFY, MSGQ and RINGIO&lt;br /&gt;DSP/Link modules on my own, including some benchmarking for the&lt;br /&gt;various calls since Daniel Allred mentioned over IRC that GPP-&amp;gt;DSP&lt;br /&gt;MSGQ message passing can take as much as 0.5ms on the hawkboard and&lt;br /&gt;using NOTIFY may be able to speed things up, although these numbers&lt;br /&gt;are likely to differ on the Beagle.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) Order of porting for the POSIX functions and how much work the DSP&lt;br /&gt;should be doing on them&lt;br /&gt;&lt;br /&gt;One of my goals in the preliminary period was to determine how much of&lt;br /&gt;the POSIX calls should be executed on the DSP and also in which order&lt;br /&gt;the porting should be carried out with respect to their internal&lt;br /&gt;dependencies. Concluding from my previous talk with Daniel over IRC&lt;br /&gt;and my own studies of the commonly used C library .h functions which&lt;br /&gt;my opinion is that -possibly- aside from a few math functions that&lt;br /&gt;involve some internal number crunching, all of the POSIX calls should&lt;br /&gt;be *completely* hosted on the GPP side, ie the DSP should only send a&lt;br /&gt;request with the function name and parameters without doing any&lt;br /&gt;pre-processing. The reasons behind this would be:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;* the DSP is not really suitable for most of the tasks involved in&lt;br /&gt;the internals of POSIX functions, which usually don't involve heavy&lt;br /&gt;mathemathical operations but things like string manipulation which the&lt;br /&gt;GPP is much more suited and optimized for&lt;br /&gt;&amp;nbsp;* there isn't really any significant time to be gained by doing some&lt;br /&gt;of the processing on the DSP since it appears as though the bottleneck&lt;br /&gt;will be the speed at which messages are carried through DSP/Link&lt;br /&gt;&amp;nbsp;* this will result in cleaner and simpler to understand code since&lt;br /&gt;the level at which processing is done on different processors doesn't&lt;br /&gt;change from function to function&lt;br /&gt;&amp;nbsp;* in the case of any modifications to the GPP side code (thinking of&lt;br /&gt;the RPC framework as in general GPP-side function calling, not just&lt;br /&gt;for POSIX calls which are very unlikely to change :)), there will be&lt;br /&gt;no extra effort involved in keeping the DSP-side code up-to-date&lt;br /&gt;&lt;br /&gt;This also means that the internal dependencies of POSIX functions&lt;br /&gt;won't have to be taken into consideration regarding the order of&lt;br /&gt;porting - the POSIX side wrappers will be dependent only on the GPP&lt;br /&gt;side host code which is already there anyway. Therefore, a pragmatic&lt;br /&gt;approach such as porting the generally most frequently used functions&lt;br /&gt;can be taken.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-3806933961381583475?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/3806933961381583475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/gsoc-weekly-report-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3806933961381583475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3806933961381583475'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/gsoc-weekly-report-1.html' title='GSoC Weekly Report #1'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-711734370730536716</id><published>2010-05-20T23:32:00.001+02:00</published><updated>2011-04-23T19:29:20.184+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><title type='text'>OpenEmbedded on Ubuntu 10.04</title><content type='html'>&lt;b&gt;NOTE: &lt;/b&gt;In light of the instructions received from Koen, the Angström head developer, you should &lt;b&gt;avoid &lt;/b&gt;following the instructions below, since the deb-based OE is appearantly faulty by design and bitbake 1.10.x should be used instead of Ubuntu's one. Use these &lt;a href="http://gitorious.org/angstrom/angstrom-setup-scripts"&gt;setup scripts&lt;/a&gt; to set-up your dev branch instead. I'm not deleting the post in case the same errors occur in some other way as well.&lt;br /&gt;&lt;br /&gt;Now's the time to talk about...setting up OpenEmbedded on Ubuntu 10.04...and...building the&amp;nbsp;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: 14px; line-height: 20px;"&gt;Ångström distribution for the BeagleBoard! &lt;i&gt;(I do realize I've created some suspense surrounding this particular subject with my previous posts, but despite the problems one may run into it's not that terrifying really :))&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;An advantage of setting up OE on Ubuntu (or any other .deb-based system, for that matter) is that one is able to use &lt;a href="http://blog.leggewie.org/?p=39"&gt;the apt-get'able OpenEmbedded&lt;/a&gt;. Following the instructions on the blog post (that is, get the repository in your sources list - sudo aptitude install openembedded-minimal - oe-setup-minimal org.openembedded.dev) the set-up part becomes a breeze - this will take care of all the necessary dependencies.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;i&gt;You may read from several sources that you absolutely shouldn't be using the bitbake that is in Ubuntu's own repositories (ie, things like DON'T sudo apt-get install bitbake) but from what I've seen, they've updated the repository and version 1.8.18 was directly available at the time of my writing this. You may want to check for yourself by executing &lt;b&gt;bitbake --version &lt;/b&gt;once you have obtained the packages, anything over 1.8.16 should be fine.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;Once you've set up the environment by executing oe-setup-minimal org.openembedded.dev &lt;i&gt;(yes, using the dev branch is appearantly recommended, instead of the stable/2009 branch) &lt;/i&gt;you can make an attempt at trying out your new oven...oh, I mean, development environment, by trying out something smaller via giving this command:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;b&gt;MACHINE=beagleboard bitbake nano&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;While we're at it, we can take a short look at parts of this particular command. Not that it's &lt;i&gt;that&lt;/i&gt; complicated but here goes anyway:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;OpenEmbedded supports a lot of different target platforms, so we should specify the platform we'll be targeting. This is what the &lt;i&gt;MACHINE=beagleboard&lt;/i&gt; part is for.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;bitbake is the central make tool, used extensively in OpenEmbedded, and nano is the name of the "recipe" for the miniscule (but useful!) text editor. For a nice introduction to bitbake and its recipes system, you may want to read &lt;a href="http://www.gumstix.net/Setup-and-Programming/view/Build-system-overview/Hello-world-tutorial/111.html"&gt;this&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;Although nano itself isn't all that complicated, the build can take some time since the initial setting up of the toolchain and base libraries will also be done.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;During the build process, you may run into several errors. I've documented the ones I've personally ran into and how I got over them.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;b&gt;Error #1: Extraction error while building expat&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;i&gt;OE Message:&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;ERROR: '/home/maltanar/oe/openembedded.org/recipes/expat/expat_2.0.1.bb' failed&lt;/div&gt;&lt;div&gt;Digging down a bit further reveals&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 20px;"&gt;&lt;div&gt;NOTE: Unpacking ../../sources/expat-2.0.1.tar.gz to ../../tmp/minimal/org.openembedded.dev/work/armv7a-oe-linux-gnueabi/expat-2.0.1-r3/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;gzip: stdin: invalid compressed data--crc error&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is a &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=588644"&gt;known bug&lt;/a&gt; in the current gzip which appearantly affects several distributions on i386 computers. The workaround I did is as follows:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Install the gzip recovery tools: &lt;b&gt;sudo apt-get install gzrt&lt;/b&gt;&lt;/li&gt;&lt;li&gt;cd into the OE sources folder ($OE_ROOT/sources, should be ~/oe/sources if you used the deb setup)&lt;/li&gt;&lt;li&gt;Run&amp;nbsp;gzrecover &lt;b&gt;expat-2.0.1.tar.gz;&amp;nbsp;mv expat-2.0.1.tar.recovered expat-2.0.1.tar;&amp;nbsp;gzip expat-2.0.1.tar&lt;/b&gt; and say yes to the overwrite&lt;/li&gt;&lt;li&gt;Generate the md5 and sha256 sums of the new file by running &lt;b&gt;md5sum expat-2.0.1.tar.gz; sha256sum expat-2.0.1.tar.gz&lt;/b&gt; and note them somewhere. Edit the expat-2.0.1.tar.gz.md5 file to reflect the new MD5 checksum.&lt;/li&gt;&lt;li&gt;cd into oe/openembedded.org/recipes/expat then edit the expat_2.0.1.bb file in your favorite text editor - change the MD5 and SHA256 checksums there to reflect the new ones, and save.&lt;/li&gt;&lt;li&gt;Done! You can run&amp;nbsp;&lt;b&gt;MACHINE=beagleboard bitbake nano &lt;/b&gt;once again.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I didn't run into any more problems while building nano, and it was eventually successfully built. And now it's the time to try the bit-baking oven on something bigger...&lt;i&gt;an image of&lt;/i&gt;&amp;nbsp;&lt;i&gt;the actual&amp;nbsp;Ångström distribution. &lt;/i&gt;Sounds fancy? Well, it starts off as simple as&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;MACHINE=beagleboard bitbake -v console-image&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;provided that you want to start out with something simple, that is, the barebones console image. Notice the extra -v passed on the command line - it can be helpful to have a verbose bitbake while building something major.&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;I've also kept track of what happened during the console-image build process:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Error #2: Trouble with glibc version while building gtk+&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;OE Message:&amp;nbsp;&lt;/i&gt;NOTE: Task failed: /home/maltanar/oe/tmp/minimal/org.openembedded.dev/work/i686-linux/gtk+-native-2.20.0-r8.0/temp/log.do_configure.11847&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In more detail:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;| checking for BASE_DEPENDENCIES... configure: error: Package requirements (glib-2.0 &amp;gt;= 2.23.6 &amp;nbsp; &amp;nbsp;atk &amp;gt;= 1.29.2 &amp;nbsp; &amp;nbsp;pango &amp;gt;= 1.20 &amp;nbsp; &amp;nbsp;cairo &amp;gt;= 1.6) were not met:&lt;/div&gt;&lt;div&gt;|&amp;nbsp;&lt;/div&gt;&lt;div&gt;| Requested 'glib-2.0 &amp;gt;= 2.23.6' but version of GLib is 2.22.1&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For some reason, although many newer glib-2.0 recipes are available, OE chooses the older ones. To solve this, I went into the oe/openembedded.org/recipes/glib-2.0 and deleted all the recipe (*.bb) files with the -native suffix (for example,&amp;nbsp;glib-2.0-native_2.2.3.bb), and re-started the build process.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;I don't understand it completely but I think the old -native suffixed recipes are sort of left-overs, since OE seems to be using the&amp;nbsp;BBCLASSEXTEND = "native" flag for this purpose now (the non-suffixed recipes all have this).&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Error #3: Trouble with mtd-utils build&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;OE error message:&lt;/i&gt;&amp;nbsp;NOTE: Task failed: /home/maltanar/oe/tmp/minimal/org.openembedded.dev/work/i686-linux/mtd-utils-native-1.3.1-r0/temp/log.do_compile.6960&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;crc32.o: could not read symbols: File in wrong format&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not sure why this happened either. I cd'd into the mtd-utils source directory (oe/tmp/minimal/org.openembedded.dev/work/i686-linux/mtd-utils-native-1.3.1-r0/git) and ran &lt;b&gt;make clean &lt;/b&gt;followed by &lt;b&gt;MACHINE=beagleboard bitbake mtd-utils &lt;/b&gt;which did complete successfully this time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After these (and several hours later) the process was complete, and I ended up with the rootfs, uImage and u-boot images in the oe/tmp/minimal/org.openembedded.dev/deploy/images directory! The uImage was still causing a kernel panic for me upon boot with a proper USB cable, so one may want to use the uImage from the /boot folder from the last BeagleBoard demo image as I mentioned in my previous post. Or maybe use an USB cable which isn't working :)&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-711734370730536716?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/711734370730536716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/openembedded-on-ubuntu-1004.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/711734370730536716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/711734370730536716'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/openembedded-on-ubuntu-1004.html' title='OpenEmbedded on Ubuntu 10.04'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-4674374068997879251</id><published>2010-05-19T11:45:00.000+02:00</published><updated>2011-04-23T19:29:20.185+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><title type='text'>A bit about OpenEmbedded</title><content type='html'>My project's primary goal is making life easier for developers who want to develop for the DSP, and thus I need to familiarize myself as much as possible with how development cycle for OMAP3 systems (specifically for the BeagleBoard) is like in order to be able to understand the pain and suffering the developers undergo. And this, in turn, involves setting up OpenEmbedded, the toolchain/build framework which is &lt;i&gt;the&lt;/i&gt; way to build the&amp;nbsp;Ångström distribution from its source.&lt;br /&gt;&lt;br /&gt;One might ask, why is a seperate build framework necessary in the first place? Isn't makefiles sufficient to carry out pretty much any build task? While I'm not exactly in the position to make expert comments on the subject, I can point out several things that would render such a seperate framework necessary:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;it makes cross-compilation &lt;i&gt;(=compiling something on your machine that's going to run on some other processor/type of machine) &lt;/i&gt;easier since you don't have to manually obtain and set-up a compiler suite for the target machine&lt;/li&gt;&lt;li&gt;building a whole Linux distribution from scratch can involve a lot of complicated internal dependencies between the things you're going to build, and this probably will mean things like a lot of downloading, untar'ing, strict order of building packages, making a lot of "make config"s and running recursive makefiles, and so on&lt;/li&gt;&lt;li&gt;as a mixture of the two above, when you want to build a specific new package for your embedded device, the build framework also helps since it keeps track of changes and dependencies for these.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;So here's what OpenEmbedded (and &lt;a href="http://en.wikipedia.org/wiki/BitBake"&gt;bitbake&lt;/a&gt;, which is quite central to OE's workings) does for you: once you set it up properly, you just tell it "all right, I want the latest&amp;nbsp;Ångström console image built for the BeagleBoard" and it downloads, configures and builds everything for you by itself! Isn't that great?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Well, of course, it's far from perfect - there might be some difficulties involved with setting it up properly, dealing with the errors that may occur during the build process, and running things for the first time tends to take very long, so be prepared to face a lot of frustration and have a lot of time in your hands (possibly even a second computer to do other things in parallel :)).&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;In my next post, I'll be describing my experiences about setting up OpenEmbedded in Ubuntu 10.04, solving the errors that may come up and similar. &lt;i&gt;As of the time of writing, I was still trying to build the&amp;nbsp;Ångström console image successfully and failing miserably, but I can at least see some light at the end of the tunnel :)&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-4674374068997879251?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/4674374068997879251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/bit-about-openembedded.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4674374068997879251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4674374068997879251'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/bit-about-openembedded.html' title='A bit about OpenEmbedded'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-4228907242858440521</id><published>2010-05-18T16:29:00.001+02:00</published><updated>2011-04-23T19:29:20.186+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><title type='text'>Ångström running on the Beagle</title><content type='html'>Once I got my Beagle communicating, it was time to get the penguins in (although later I found out that carrying out the actual verification process might have been a good idea - &lt;a href="http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidationv3"&gt;check here&lt;/a&gt; for the latest version of the official verification process).&lt;br /&gt;&lt;br /&gt;Following the instructions on the &lt;a href="http://elinux.org/BeagleBoardBeginners"&gt;beginners page on eLinux wiki&lt;/a&gt;, I decided to use &lt;a href="http://cgit.openembedded.org/cgit.cgi/openembedded/tree/contrib/angstrom/omap3-mkcard.sh"&gt;XorA's script&lt;/a&gt; to make formatting the SD card easier. On my Ubuntu 10.04 machine, the 2GB Kingston card I used showed up as /dev/mmcblk0 and it was a simple matter of sudo-calling the script on it afterwards. I plugged out the card and put it back again, verifying that both partitions (boot and rootfs) were in place when Ubuntu displayed them on the desktop.&lt;br /&gt;&lt;br /&gt;Next, I downloaded the latest Beagle demo image files from &lt;a href="http://www.angstrom-distribution.org/demo/beagleboard/"&gt;here&lt;/a&gt;, which were as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the latest rootfs archive,&amp;nbsp;Angstrom-Beagleboard-demo-image-glibc-ipk-2010.3-beagleboard.rootfs.tar.bz2&amp;nbsp;&lt;/li&gt;&lt;li&gt;the MLO file, MLO&lt;/li&gt;&lt;li&gt;the modules archive, modules.tgz&lt;/li&gt;&lt;li&gt;the u-boot image, u-boot.bin&lt;/li&gt;&lt;li&gt;the kernel image, uImage&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Then I followed the copy order present in the wiki (MLO, u-boot and uImage to the boot partition, copy and untar the rootfs into the rootfs partition, followed by copying and untar'ing the modules archive in the same place). My hands were getting sweaty as the big moment approached. Would I see the ASCII&amp;nbsp;Ångström logo? Would I get kernel panics, or everything just freezing at some point while booting?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There was only one way to find out. I sudo'd up minicom, put in the SD card into the Beagle card reader, held down the USER button on my Beagle, and connected the &lt;a href="http://www.toshibadirect.com/images/ui3/accessories/toshiba-usb-y-cable-ba82010-300.gif"&gt;Y USB cable&lt;/a&gt;...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And there it was! All to swiftly, the kernel uncompressed itself, set up, and a couple of ten seconds later I was greeted by the ASCII&amp;nbsp;Ångström logo, prompting me for the username. I typed in "root" and got to the shell. After playing around for a little while with some commands and verifying that everything was working, I decided to try out setting up USB networking and then VNC'ing into the Beagle to see some GUI action. I set up an IP address on the Beagle side for the usb0 using ifconfig as described, then enabled the interface.&lt;br /&gt;&lt;br /&gt;But something was wrong: my Ubuntu host didn't detect the Beagle at all! I looked at the dmesg kernel logs, the lsusb device listing, the network manager interfaces list...it simply wasn't there. I tried loading the usbnet and cdc_ether kernel modules manually on the host side, re-loading them on the Beagle side and many combinations of these actions in different orderings - none of which helped.&lt;br /&gt;&lt;br /&gt;I was feeling quite depressed when Koen mentioned in #beagle that the problem might be a bad USB cable :)&lt;br /&gt;&lt;br /&gt;Rummaging around the house, I found another USB A to mini B cable, and tried with that instead. Instantly, before the kernel had even booted up, it showed up as an USB gadget in the Ubuntu networking manager! I had just sighed with relief, but was just about to find out it's too soon...&lt;br /&gt;&lt;br /&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;b&gt;It was time for...Kernel Panic!&lt;/b&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;[ &amp;nbsp; 17.127868] Unable to handle kernel NULL pointer dereference at virtual address 00000014&lt;br /&gt;[ &amp;nbsp; 17.135986] pgd = c0004000&lt;br /&gt;[ &amp;nbsp; 17.138732] [00000014] *pgd=00000000&lt;br /&gt;[ &amp;nbsp; 17.142333] Internal error: Oops: 5 [#1] PREEMPT&lt;br /&gt;[ &amp;nbsp; 17.146972] last sysfs file:&lt;br /&gt;[ &amp;nbsp; 17.149963] Modules linked in:&lt;br /&gt;[ &amp;nbsp; 17.153045] CPU: 0 &amp;nbsp; &amp;nbsp;Tainted: G &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;W &amp;nbsp; (2.6.32 #1)&lt;br /&gt;[ &amp;nbsp; 17.158325] PC is at musb_interrupt+0x9f8/0xbb8&lt;br /&gt;[ &amp;nbsp; 17.162902] LR is at musb_interrupt+0x9e4/0xbb8&lt;br /&gt;[ &amp;nbsp; 17.167449] pc : [&lt;c0340df8&gt;] &amp;nbsp; &amp;nbsp;lr : [&lt;c0340de4&gt;] &amp;nbsp; &amp;nbsp;psr: 60000193&lt;/c0340de4&gt;&lt;/c0340df8&gt;&lt;br /&gt;[ &amp;nbsp; 17.167449] sp : c0625ee0 &amp;nbsp;ip : c0625f18 &amp;nbsp;fp : 000000f0&lt;br /&gt;[ &amp;nbsp; 17.178985] r10: 00000000 &amp;nbsp;r9 : 00000099 &amp;nbsp;r8 : 00000009&lt;br /&gt;[ &amp;nbsp; 17.184234] r7 : 00000000 &amp;nbsp;r6 : cf82f108 &amp;nbsp;r5 : 00000001 &amp;nbsp;r4 : 00000000&lt;br /&gt;[ &amp;nbsp; 17.190795] r3 : 00000000 &amp;nbsp;r2 : 00000000 &amp;nbsp;r1 : fa0ab000 &amp;nbsp;r0 : cf82f108&lt;br /&gt;[ &amp;nbsp; 17.197357] Flags: nZCv &amp;nbsp;IRQs off &amp;nbsp;FIQs on &amp;nbsp;Mode SVC_32 &amp;nbsp;ISA ARM &amp;nbsp;Segment kernel&lt;br /&gt;[ &amp;nbsp; 17.204803] Control: 10c5387d &amp;nbsp;Table: 80004019 &amp;nbsp;DAC: 00000017&lt;br /&gt;[ &amp;nbsp; 17.210571] Process swapper (pid: 0, stack limit = 0xc06242f0)&lt;br /&gt;[ &amp;nbsp; 17.216430] Stack: (0xc0625ee0 to 0xc0626000)&lt;br /&gt;[ &amp;nbsp; 17.220825] 5ee0: 00000000 ffff6b60 00000000 c0684a28 c0624000 cf82f108 60000113 cf8a0a00&lt;br /&gt;[ &amp;nbsp; 17.229064] 5f00: c0624000 0000005c 00000000 00000000 c066cfc0 c034101c 060db884 cf8a0a00&lt;br /&gt;[ &amp;nbsp; 17.237274] 5f20: c063a5d8 c00a4e90 00000000 cf8a0a00 c063a5d8 0000005c 00000002 00000001&lt;br /&gt;[ &amp;nbsp; 17.245513] 5f40: c0624000 0000001f 00000000 c00a7058 0000005c 00000000 c0627e84 c003c074&lt;br /&gt;[ &amp;nbsp; 17.253723] 5f60: 00000001 ffffffff fa200000 c003cb44 00000000 80000013 80000013 00000000&lt;br /&gt;[ &amp;nbsp; 17.261962] 5f80: c0624000 c0627fe0 c0627e84 c0670fcc 8002f790 411fc083 0000001f 00000000&lt;br /&gt;[ &amp;nbsp; 17.270172] 5fa0: c06385c8 c0625fbc c004ca8c c004d2e4 60000013 ffffffff 00000000 c003dfc4&lt;br /&gt;[ &amp;nbsp; 17.278411] 5fc0: 00000000 c06b80a0 c0670f90 c0032010 c0627e78 c0008984 c0008498 00000000&lt;br /&gt;[ &amp;nbsp; 17.286621] 5fe0: 00000000 c0032010 10c53c7d c0671020 c0032414 80008034 00000000 00000000&lt;br /&gt;[ &amp;nbsp; 17.294891] [&lt;c0340df8&gt;] (musb_interrupt+0x9f8/0xbb8) from [&lt;c034101c&gt;] (generic_interrupt+0x64/0xa8)&lt;/c034101c&gt;&lt;/c0340df8&gt;&lt;br /&gt;[ &amp;nbsp; 17.304168] [&lt;c034101c&gt;] (generic_interrupt+0x64/0xa8) from [&lt;c00a4e90&gt;] (handle_IRQ_event+0xac/0x1ec)&lt;/c00a4e90&gt;&lt;/c034101c&gt;&lt;br /&gt;[ &amp;nbsp; 17.313537] [&lt;c00a4e90&gt;] (handle_IRQ_event+0xac/0x1ec) from [&lt;c00a7058&gt;] (handle_level_irq+0xbc/0x148)&lt;/c00a7058&gt;&lt;/c00a4e90&gt;&lt;br /&gt;[ &amp;nbsp; 17.322906] [&lt;c00a7058&gt;] (handle_level_irq+0xbc/0x148) from [&lt;c003c074&gt;] (asm_do_IRQ+0x74/0x98)&lt;/c003c074&gt;&lt;/c00a7058&gt;&lt;br /&gt;[ &amp;nbsp; 17.331665] [&lt;c003c074&gt;] (asm_do_IRQ+0x74/0x98) from [&lt;c003cb44&gt;] (__irq_svc+0x44/0xa8)&lt;/c003cb44&gt;&lt;/c003c074&gt;&lt;br /&gt;[ &amp;nbsp; 17.339721] Exception stack(0xc0625f70 to 0xc0625fb8)&lt;br /&gt;[ &amp;nbsp; 17.344787] 5f60: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000 80000013 80000013 00000000&lt;br /&gt;[ &amp;nbsp; 17.353027] 5f80: c0624000 c0627fe0 c0627e84 c0670fcc 8002f790 411fc083 0000001f 00000000&lt;br /&gt;[ &amp;nbsp; 17.361236] 5fa0: c06385c8 c0625fbc c004ca8c c004d2e4 60000013 ffffffff&lt;br /&gt;[ &amp;nbsp; 17.367919] [&lt;c003cb44&gt;] (__irq_svc+0x44/0xa8) from [&lt;c004d2e4&gt;] (omap3_pm_idle+0x4c/0x50)&lt;/c004d2e4&gt;&lt;/c003cb44&gt;&lt;br /&gt;[ &amp;nbsp; 17.376220] [&lt;c004d2e4&gt;] (omap3_pm_idle+0x4c/0x50) from [&amp;lt;00000000&amp;gt;] (0x0)&lt;/c004d2e4&gt;&lt;br /&gt;[ &amp;nbsp; 17.383148] Code: e3530003 13a02000 05963078 05933018 (05d33014)&lt;br /&gt;[ &amp;nbsp; 17.389343] ---[ end trace 650abcc06c2958fc ]---&lt;br /&gt;[ &amp;nbsp; 17.394012] Kernel panic - not syncing: Fatal exception in interrupt&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="text-align: left;"&gt;I'll admit that it wasn't very pleasant, and the fact that I could boot the kernel just fine with the "bad" USB cable was also a bit curious. I still don't know for sure why this particular kernel panic occurs, but it seems to be related with the USB gadget drivers (I don't think it's host-computer related, since I got exactly the same results using a Windows XP host as well. How I hate HyperTerminal).&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Guessing that it's probably a kernel issue, I decided to go for the other closest kernel image I could get my hands on, which was really close indeed. In the rootfs, under the /boot directory was another uImage-2.6.32 so I just copied it to my computer, did a comparison with cmp against the uImage I had downloaded to make sure it wasn't the same (it wasn't), and finally replaced the uImage with the one from /boot. This did solve the kernel panic issue, and I was once again able to get to the shell. And this time, the USB networking was all functional! I first ssh'd into the Beagle to make sure everything was working, then I used Ubuntu's VNC viewer (called "Remote Desktop Viewer") to take a small tour of the&amp;nbsp;Ångström Enlightenment GUI. All was fine and mellow :)&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;Coming Up Next: Setting up OpenEmbedded in Ubuntu 10.04&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-4228907242858440521?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/4228907242858440521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/angstrom-running-on-beagle.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4228907242858440521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/4228907242858440521'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/angstrom-running-on-beagle.html' title='Ångström running on the Beagle'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-8453343477955654449</id><published>2010-05-16T11:15:00.000+02:00</published><updated>2011-04-23T19:29:20.187+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><title type='text'>Setting up the BeagleBoard and the dev-env</title><content type='html'>My Beagle arrived some three days ago after waiting in the local DHL distribution hub for several days (something went wrong with the address). As can be imagined, I was quite happy about finally receiving it and immediately made some nerd porn (=unboxing photos) out of it. A handsome little board it is to be sure.&lt;br /&gt;&lt;br /&gt;Next was a little cable nightmare to go through. The Beagle has various channels of communications available, but unfortunately the RS232 (serial) interface is somewhat compulsory to get the board going for the first time. Thus I went out hunting in Uppsala to find the AT/Everex (IDC-10 to DBM9) cable.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.logicsupply.com/images/photos/cables/db9-idc10_big.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="260" src="http://www.logicsupply.com/images/photos/cables/db9-idc10_big.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Doesn't look all that fancy, does it? The problem is that it's a bit old and it's not the kind of thing that one would come across in modern electronics stores. I tried several bigger boutiques like MediaMarkt, ELGiganten, ONOFF, then a number of smaller shops in town. Not a chance. I finally found it in a modding/hardware service kind of shop (the variant I bought, as seen above, allows the serial port to be "brought out" from the older motherboards) and bought a female-to-female null modem cable there as well. Voila!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Back home, I noticed that the input pin 10 in my cable was plugged - appearantly pin 10 is used neither on the Beagle nor the cable itself, so it's suggested to either remove the plug or cut away the pin 10 on the Beagle. I tried removing the plug on the cable with a hot needle but it put up quite a fight. And I didn't have needle-nose pliers, so I just bent pin 10 on the Beagle sideways instead. It looks a bit crocodile-ish but does the job (plus it gives reference together with the plugged corner of the cable so I can't plug in the cable backwards :)).&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I set up minicom on my Ubuntu 10.04 system, connected the USB-to-serial adapter (which uses the profilic PL2303 kernel module and works without problems, by the way) to the null modem cable, connnected the Beagle to the null modem with the AT/Everex cable, plugged in the USB A to miniB cable, and got a warm welcome from the U-Boot already present on the NAND.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;i&gt;Coming up next:&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="color: #131313; font-family: Verdana, sans-serif; font-size: 14px; line-height: 20px;"&gt;&lt;i&gt;Ångström running on the Beagle and the importance of working and non-working USB cables.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-8453343477955654449?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/8453343477955654449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/setting-up-beagleboard-and-dev-env.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8453343477955654449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/8453343477955654449'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/setting-up-beagleboard-and-dev-env.html' title='Setting up the BeagleBoard and the dev-env'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-6979217347941616322</id><published>2010-05-15T18:31:00.003+02:00</published><updated>2010-05-15T19:57:51.651+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='dsp'/><category scheme='http://www.blogger.com/atom/ns#' term='beagleboard'/><title type='text'>So what's this all about?</title><content type='html'>&lt;div style="text-align: left;"&gt;My dear readers(-to-be), welcome once again to maltanar's scribbles. Aside from attempting a reclaim on the blogging world, this blog will also serve a more important purpose. Here will be my scribbles on my &lt;a href="http://socghop.appspot.com"&gt;Google Summer of Code&lt;/a&gt; project, for the &lt;a href="http://www.beagleboard.org"&gt;BeagleBoard&lt;/a&gt;, which was initially entitled, rather horrifically, RPC-Like POSIX Wrappers for DSPEasy. A better name is in the works, but in the meanwhile I'd like to tell you all what it's all about.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;BeagleBoard is (and &lt;a href="http://www.openpandora.org"&gt;the Pandora&lt;/a&gt; will be) a powerhouse, thanks to its 3-core (a GPP - generic processing, a GPU - for graphics processing, and a DSP - for, let's say, heavy number crunching! the acronym itself means Digital Signal Processor) OMAP3530 system. Therefore &lt;i&gt;laptop-like performance at handheld power levels &lt;/i&gt;is most certainly not a myth. But to be able to achieve true laptop-like performance, the power inside needs to be harnessed to the max.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Of course, thanks to the heterogenous multi-core architecture, there are quite a few different ways in which this power can be harnessed. What I'll be doing will be targeting the DSP. Or more accurately, I'll be doing something that targets (in a friendly way!) programmers that wish to develop for the DSP by doing their work easier.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Right now, making actual use of the DSP is rather cumbersome and even after once you've gotten started, the development cycle isn't exactly bliss: you can't just "printf" the results of your experimental FFT code to the screen, for example, since there is really none - you have to deal with the details of interprocessor communications to see what's going on inside the DSP, as well as put data inside. &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;My aim with this project will be to create a RPC (remote procedure call)-like framework, which can be used to call any GPP-side function from the DSP-side, and create a set of POSIX wrappers using this framework to make life easier for developers. &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Actual &lt;i&gt;status update&lt;/i&gt;s coming soon! :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-6979217347941616322?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/6979217347941616322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/05/so-whats-this-all-about.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6979217347941616322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/6979217347941616322'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/05/so-whats-this-all-about.html' title='So what&apos;s this all about?'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3408232604952387301.post-3655724048737294796</id><published>2010-04-09T10:41:00.003+02:00</published><updated>2010-04-09T10:51:41.912+02:00</updated><title type='text'>New blog is here</title><content type='html'>&lt;div&gt;Having let maltanar.net down for quite some time, I started feeling guilty and eventually decided that blogging was worth another try. Plus, I have a feeling that it might just become necessary in the near future. So...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_988HDVUXZuY/S77qflsVSuI/AAAAAAAACng/X9WLYwdGmSM/s1600/watch.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 230px; height: 320px;" src="http://4.bp.blogspot.com/_988HDVUXZuY/S77qflsVSuI/AAAAAAAACng/X9WLYwdGmSM/s320/watch.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5458057626834520802" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3408232604952387301-3655724048737294796?l=maltanar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maltanar.blogspot.com/feeds/3655724048737294796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://maltanar.blogspot.com/2010/04/new-blog-is-here.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3655724048737294796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3408232604952387301/posts/default/3655724048737294796'/><link rel='alternate' type='text/html' href='http://maltanar.blogspot.com/2010/04/new-blog-is-here.html' title='New blog is here'/><author><name>maltanar</name><uri>http://www.blogger.com/profile/09798114947608875520</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://1.bp.blogspot.com/_988HDVUXZuY/S--4QqPtXPI/AAAAAAAACpY/E6OsgYF-u0E/S220/23929_329283958089_747218089_3466404_2051254_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_988HDVUXZuY/S77qflsVSuI/AAAAAAAACng/X9WLYwdGmSM/s72-c/watch.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
