<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: STM32F4 progress - I want to change all the interrupt vectors</title>
		<link>http://forums.leaflabs.com/topic.php?id=1505</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Sat, 18 May 2013 09:37:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1505" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10071</link>
			<pubDate>Mon, 02 Apr 2012 19:31:08 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">10071@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42 - just got home, off to bed. I think I suddenly understand! I'll have a look in the morning.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10069</link>
			<pubDate>Mon, 02 Apr 2012 18:58:24 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">10069@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You can remove the ifdef or define it in the makefile, as you want, but it is still buggy for the F1 and also needs to be fixed there.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10063</link>
			<pubDate>Mon, 02 Apr 2012 07:07:46 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">10063@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42 - sorry for the slow response. Been busy.&#60;/p&#62;
&#60;p&#62;I don't think we need two variations of the STM32F4 interrupt vectors do we?&#60;/p&#62;
&#60;p&#62;AFAICT, the 405/415/407/417 STM32F4  members have the same interrupt vectors.&#60;br /&#62;
The 405/415 won't use the ethernet vector because they have no ethernet peripheral, but AFAICT vectors don't move because of that.&#60;/p&#62;
&#60;p&#62;So, I think STM32_HIGH_DENSITY should be removed. Yes?&#60;br /&#62;
You've made me all nervous now B-/
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10054</link>
			<pubDate>Sun, 01 Apr 2012 21:47:28 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">10054@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I just noticed that the Makefile does not set the STM32_HIGH_DENSITY flag referenced in stm32_vector_table.S, so the additional vectors are missing. This bug exists in the libcs3_stm32_src and libcs4_stm32_src directory. You can fix it by adding&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;high-density: ASFLAGS := -DSTM32_HIGH_DENSITY&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to Makefile in line 28.&#60;/p&#62;
&#60;p&#62;Bad libcs3_stm32_high_density.a or libcs4_stm32_high_density.a look like&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;0004c0  74 63 61 6c 61 72 6d 00 5f 5f 69 72 71 5f 75 73  tcalarm.__irq_us
0004d0  62 77 61 6b 65 75 70 00 5f 73 74 61 72 74 00 5f  bwakeup._start._
0004e0  5f 63 73 33 5f 73 74 61 72 74 5f 63 00 00 2f 2f  _cs3_start_c..//&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Good libs contain the text __irq_tim8_brk like&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;000500  72 71 5f 72 74 63 61 6c 61 72 6d 00 5f 5f 69 72  rq_rtcalarm.__ir
000510  71 5f 75 73 62 77 61 6b 65 75 70 00 5f 5f 69 72  q_usbwakeup.__ir
000520  71 5f 74 69 6d 38 5f 62 72 6b 00 5f 5f 69 72 71  q_tim8_brk.__irq&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The default libcs3_stm32_high_density.a from libmaple 0.0.12 also has this bug.&#60;br /&#62;
You can also detect the bad libcs3_stm32_high_density.a from the file length. Same length as libcs3_stm32_med_density.a means buggy lib.&#60;/p&#62;
&#60;p&#62;Took me some hours to understand why my program crashed when I enabled the OTG_FS irq and why OTG_FS_IRQHandler was never called.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10036</link>
			<pubDate>Fri, 30 Mar 2012 14:27:23 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">10036@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42 - thank you. Busy, so will push over the weekend.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10027</link>
			<pubDate>Thu, 29 Mar 2012 22:32:43 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">10027@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;To answer your question of your first post, I have nothing against renaming the vector names for better compatibility with the STM libraries.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-10022</link>
			<pubDate>Thu, 29 Mar 2012 10:48:02 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">10022@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I extended the maple vector table by the additional vectors supported by the F4 ...&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes I understood that.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Don't you get linker errors when the ST code uses the same vectors already used by the libmaple code ...?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes-ish. &#60;/p&#62;
&#60;p&#62;If I try to build a program with multiple interrupt or exception handlers with the same name, yes there are link errors. A human being has to decide what to do about . The way I'd explain that is &#34;I get linker errors when ST code and libmaple both supply the handler code for the same interrupt or exception vector&#34;. &#60;/p&#62;
&#60;p&#62;This isn't always a problem because often the ST code supplies a handler which is:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;void DebugMon_Handler(void)
{
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;or&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;void BusFault_Handler(void)
{
  /* Go to infinite loop when Bus Fault exception occurs */
  while (1)
  {
  }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;An approach is to edit the ST Project, and 'throw away' all of those 'empty' handlers. &#60;/p&#62;
&#60;p&#62;Even this isn't too difficult because the file is always (almost always?) called stm32f4xx_it.c&#60;/p&#62;
&#60;p&#62;The handlers have well defined names (they are interrupt or exception vector names) so it could be done 'auto-magically' with a script if the task became large and onerous.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9950</link>
			<pubDate>Wed, 28 Mar 2012 23:00:40 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">9950@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I extended the maple vector table by the additional vectors supported by the F4, so the last entries were made by me, all previous by leaflabs. Looks like I added the __irq_ prefix so they look more like the previous maple entries.&#60;br /&#62;
Don't you get linker errors when the ST code uses the same vectors already used by the libmaple code, e.g. with the timer and usart vectors ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9935</link>
			<pubDate>Wed, 28 Mar 2012 05:31:02 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">9935@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;BTW - I believe &#60;strong&#62;all&#60;/strong&#62; of the startup code can be written in C, including the interrupt vector table, and the code to switch on the FPU. &#60;/p&#62;
&#60;p&#62;It is not a high-priority for me, but seems like a 'nice to have'. &#60;/p&#62;
&#60;p&#62;It might help anyone interested to get to the bottom of everything.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9921</link>
			<pubDate>Tue, 27 Mar 2012 18:35:35 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">9921@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;...it would be a lot easier you link your changes so I can have a look at it :)&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Doh! Sorry about that folks&#60;/p&#62;
&#60;p&#62;Here is the version of the vector table which contains some explanatory comments:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/2EyfCPez&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/2EyfCPez&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;@bubulindo - I have not got the USB connection going. I am hoping ST's code will mostly work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9912</link>
			<pubDate>Mon, 26 Mar 2012 22:50:32 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">9912@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;&#38;gt;The interrupt names are straightforward to find from the ST Micro's STM32F4 documentation without looking at the source code. The names follow a simple rule.&#60;br /&#62;
While this might be the case, it would be a lot easier you link your changes so I can have a look at it :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bubulindo on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9909</link>
			<pubDate>Mon, 26 Mar 2012 18:09:15 +0000</pubDate>
			<dc:creator>bubulindo</dc:creator>
			<guid isPermaLink="false">9909@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;That would be awesome. :) &#60;/p&#62;
&#60;p&#62;I got completely sidetracked from the STM32F4 stuff I was doing, but hopefully can come back not long from now. &#60;/p&#62;
&#60;p&#62;@gbulmer, did you get the USB communication going? &#60;/p&#62;
&#60;p&#62;Also, what would be the must haves for an expansion board? So far I thought of an SD card slot, Xbee interface (or FTDI interface) and if would be nice to include an LCD, or a simple connection possibility for one.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mikep on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9907</link>
			<pubDate>Mon, 26 Mar 2012 16:30:16 +0000</pubDate>
			<dc:creator>mikep</dc:creator>
			<guid isPermaLink="false">9907@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;+1&#60;br /&#62;
I think it would help people getting their problems solved and maybe contribute their solutions as well. I think at some point there was an issue about the questionable license terms of the ST libraries, but for most of us hobbyists here that is really a non-issue.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ThomasB on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9905</link>
			<pubDate>Mon, 26 Mar 2012 14:03:06 +0000</pubDate>
			<dc:creator>ThomasB</dc:creator>
			<guid isPermaLink="false">9905@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@My goal is to ensure we can use an STM32F4 libmaple-style/wiring-style library at the same time, in the same program (sketch) as ST's code.&#60;/p&#62;
&#60;p&#62;Whow! This would be really cool :)&#60;/p&#62;
&#60;p&#62;The ST lib is a sourcecode base, which is well known by a lot of developer.&#60;br /&#62;
And if a programmer has questions or problems, the chance that google can help is bigger.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "STM32F4 progress - I want to change all the interrupt vectors"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1505#post-9900</link>
			<pubDate>Mon, 26 Mar 2012 08:52:58 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">9900@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have been working with ala42's STM32F4 library&#60;br /&#62;
&#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=1268&#38;amp;page=2#post-7828&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=1268&#38;amp;page=2#post-7828&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I have also been working with ST Micro's libraries and examples. It is not possible to mix ala42's interrupt vector names with the ST's libraries, and vice versa.&#60;/p&#62;
&#60;p&#62;I have changed all of the interrupt vector names in ala42's code so that they all match the ones ST Micro use in their libraries and projects. &#60;/p&#62;
&#60;p&#62;This allows me to successfully compile, link and run ST Micro's own STM32F4 peripheral library, and some of their projects. For example I have their IO_toggle and MEMS 3D-accelerometer demo working on my STM32F4Discovery.&#60;/p&#62;
&#60;p&#62;The interrupt names are straightforward to find from the ST Micro's STM32F4 documentation without looking at the source code. The names follow a simple rule.&#60;/p&#62;
&#60;p&#62;This is such a pervasive change to ala42's code that I feel I should ask for feedback. I am especially asking ala42.&#60;/p&#62;
&#60;p&#62;I also thought folks working with ala42's library may have written their own code which uses the existing vector-names in ala42's library. &#60;/p&#62;
&#60;p&#62;So I have written an 'ed'  script which will edit source code, and change the interrupt vector names 'automatically'. &#60;/p&#62;
&#60;p&#62;Folks can apply this technique to their source. That would bring us to a set of sources which share the same interrupt vector names.  That would allow us to mix and merge our source code, which I feel is very important.&#60;/p&#62;
&#60;p&#62;Will my 'ed' script be adequate for anyone working on the source who has a lot of code which uses those interrupt names? Specifically, is there anyone working on the source, who would need to change a lot of interrupt vector names, who don't have 'ed'   (i.e. more than 10 minutes of hand editing and testing)?&#60;/p&#62;
&#60;p&#62;I think there is huge advantages in using the same vector names as ST. We get all of their projects to run on STM32F4-based boards and can use their projects to test boards and electronics. Their code may be ugly, but I'll take ugly and mostly-works over most alternatives :-)&#60;/p&#62;
&#60;p&#62;My goal is to ensure we can use an STM32F4 libmaple-style/wiring-style library at the same time, in the &#60;strong&#62;same program&#60;/strong&#62; (sketch) as ST's code. &#60;/p&#62;
&#60;p&#62;The same technology (ed) I use to change ala42's interrupt-vector names can be used to change them to something else, so I don't think there is much of a problem. &#60;/p&#62;
&#60;p&#62;Question:&#60;br /&#62;
What objections are there to me pushing all of my vector-name changes, into the ala42-based openstm32sw/stm32f4 github repo?&#60;br /&#62;
I will also push my ed-script too so folks can bring their source in-line.&#60;/p&#62;
&#60;p&#62;I will wait until Friday before pushing to give folks time to think and respond.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
