<?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: Help with variable declaration</title>
		<link>http://forums.leaflabs.com/topic.php?id=1150</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:22:19 +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=1150" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Help with variable declaration"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1150#post-7075</link>
			<pubDate>Wed, 02 Nov 2011 17:57:27 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7075@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I assume the &#60;code&#62;...,...,...&#60;/code&#62; is just you shortening the example.&#60;/p&#62;
&#60;p&#62;put a ; after the closing }&#60;br /&#62;
(I'd put a space around the =, but it doesn't matter)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;unsigned char Song9[12*95] __FLASH__ = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// ..., ..., ...
};&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;There isn't anything else to do. Pointers, or indexing into the array 'just work' (TM:-).&#60;br /&#62;
Unlike the Atmel AVR, and some other microcontrollers (MCUs), the ARM Cortex-M3 has a single 32-bit address space for program, data and peripheral, so Cortex-M3 MCUs don't need special instructions to read flash.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>yokurk on "Help with variable declaration"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1150#post-7074</link>
			<pubDate>Wed, 02 Nov 2011 14:56:06 +0000</pubDate>
			<dc:creator>yokurk</dc:creator>
			<guid isPermaLink="false">7074@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi all,&#60;br /&#62;
im new to this platform and am trying to port a program i was using with arduino to maple.&#60;br /&#62;
The program is something related to lcd display.&#60;/p&#62;
&#60;p&#62;I have avoided use of pgmspace.h by using the declarations as suggested in &#60;a href=&#34;http://leaflabs.com/docs/arm-gcc.html#switching-from-avr-gcc&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/arm-gcc.html#switching-from-avr-gcc&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The problem is the file depends on another file that holds an array :&#60;/p&#62;
&#60;p&#62;unsigned char Song9[12*95] __FLASH__={&#60;br /&#62;
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,&#60;br /&#62;
...,...,...&#60;br /&#62;
}&#60;br /&#62;
When i compile this i get this error:&#60;br /&#62;
 error: expected '=', ',', ';', 'asm' or '__attribute__' before '__FLASH__'&#60;/p&#62;
&#60;p&#62;Please help me with this. And the array holds some char values.&#60;/p&#62;
&#60;p&#62;Please explain how you store it in the Flash or along with the program itself (either way is ok).
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
