<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LM3S1608</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34462/lm3s1608</link><description> 
Hello, 

 
new compiler V5.05 does not handle an expression: 
lastrec[2] = (kol_strok / 4); // 

 
and so works: 
lastrec[2] = kol_strok / 4; // 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/150452?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 10:20:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6a07fccc-5f91-4877-98f4-1f8c4d709cf1</guid><dc:creator>Serge</dc:creator><description>&lt;p&gt;&lt;p&gt;
I continue to test the project. Recently, the situation with the
failure of repeated data. Probably nothing to do with braces ...&lt;br /&gt;
Let me get a stable result and be sure to let you know&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/150018?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 10:04:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3cca6c11-61cb-498d-9c7a-eed0d0dff51d</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
Perhaps you can provide a &lt;b&gt;complete&lt;/b&gt; test example that shows
the array content via a printf() for the two cases you&amp;#39;ve identified.
Use the PRE tags when posting source code, see &amp;quot;Posting Tips&amp;quot;&lt;/p&gt;

&lt;p&gt;
Ideally post a link to a zipped project.&lt;/p&gt;

&lt;p&gt;
I&amp;#39;m not seeing any casting or precedence issues in the fragments
you&amp;#39;ve provided thus far, but perhaps I&amp;#39;m missing some context
here.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/140858?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 08:45:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e7f31513-a810-4ebb-8d44-09bab2682494</guid><dc:creator>Serge</dc:creator><description>&lt;p&gt;&lt;p&gt;
This code calculates the address of the data access. Then, the
address is inserted in the data request command. After receiving the
data I have seen the incorrect data - address formed properly.&lt;/p&gt;

&lt;p&gt;
I have carefully looked at the code and see the unnecessary
brackets here are:&lt;/p&gt;

&lt;p&gt;
lastrec [2] = (resint / 4);&lt;/p&gt;

&lt;p&gt;
and such&lt;/p&gt;

&lt;p&gt;
lastrec [3] = (resint - (lastrec [2] * 4)) + 1;&lt;/p&gt;

&lt;p&gt;
I removed the brackets and it worked.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/137241?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 08:30:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4af4d0e9-4378-496e-818c-9207c946596f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What is that supposed to mean?!&lt;/p&gt;

&lt;p&gt;
What, exactly, made you think that?&lt;/p&gt;

&lt;p&gt;
In what way(s), exactly, did you think the handling was &amp;quot;not
correct&amp;quot;?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/128955?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 08:07:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:adfc2d62-e927-4ef9-8b0b-a6f7ac6a164b</guid><dc:creator>Serge</dc:creator><description>&lt;p&gt;&lt;p&gt;
I thought that is not handled correctly set brackets. Therefore, I
check all the brackets and excess removed. That is all.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/120597?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 07:44:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b6c16ab8-9f04-4035-a13d-4e1cb46232c6</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
You still haven&amp;#39;t said what you feel is wrong!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/108285?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 07:36:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f032d3b2-e647-448f-80df-9045a60733cc</guid><dc:creator>Serge</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks, Ralf.&lt;br /&gt;
It was some kind of magic, because this is a very simple script, not
to work. But it was ...&lt;br /&gt;
to your questions:&lt;br /&gt;
1. I use last uvision 5.15 and default compiler (armcc.exe V5.05
update 2 (build 169)).&lt;br /&gt;
2. variables and code below:&lt;br /&gt;
unsigned char lastrec[4];&lt;br /&gt;
U16 resint;&lt;/p&gt;

&lt;p&gt;
resint = 0xDE; // or 222&lt;/p&gt;

&lt;p&gt;
lastrec[2] = (resint / 4); // lastrec[2] == 0x37 or 55&lt;/p&gt;

&lt;p&gt;
lastrec[3] = (resint - (lastrec[2] * 4)) + 1; // 222 - (55 * 4) +1
== 3&lt;/p&gt;

&lt;p&gt;
lastrec[3] *= 0x40; // 3 * 0x40 = 0xC0&lt;/p&gt;

&lt;p&gt;
lastrec[2] += 0xC0; // 0x37 + 0xC0 = 0xF7&lt;/p&gt;

&lt;p&gt;
__nop();&lt;/p&gt;

&lt;p&gt;
3. no errors and messages.&lt;/p&gt;

&lt;p&gt;
Thank you and best regards,&lt;br /&gt;
Sergey&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/108284?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 01:26:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bb78d578-506e-42fc-af2f-149116dab512</guid><dc:creator>R.Kopsch</dc:creator><description>&lt;p&gt;&lt;p&gt;
(Please remove code that is commented out from your snippets)&lt;/p&gt;

&lt;p&gt;
Testing that code also did not result in an error.&lt;/p&gt;

&lt;p&gt;
For a closer investigation it is required to know:&lt;br /&gt;
- the toolchain and version in use (Help - About &amp;micro;Vision)&lt;br /&gt;
- the definitons of all variables&lt;br /&gt;
- the error message your project results in (screenshot of Build
Output window)&lt;/p&gt;

&lt;p&gt;
Thank you and best regards,&lt;br /&gt;
Ralf&lt;/p&gt;

&lt;p&gt;
R.Kopsch&lt;br /&gt;
Senior Applications Engineer&lt;br /&gt;
ARM Germany GmbH&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/82650?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 01:04:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:72f3bef9-65e5-4ce8-b3f7-14c86ea22f08</guid><dc:creator>Serge</dc:creator><description>&lt;p&gt;&lt;p&gt;
this works: lastrec[2] = resint / 4; // resint == 0xDF __nop();
__nop(); //lastrec[3] = resint - (lastrec[2] * 4) + 1; // lastrec[3]
= resint - ((resint / 4) * 4) + 1; // __nop(); __nop(); lastrec[3] *=
0x40; // lastrec[2] += 0xC0; //&lt;/p&gt;

&lt;p&gt;
this not works: lastrec[2] = resint / 4; // lastrec[3] = resint -
(lastrec[2] * 4) + 1; // lastrec[3] *= 0x40; // lastrec[2] += 0xC0;
//&lt;/p&gt;

&lt;p&gt;
P.S.: my name is Sergey&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/69254?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 00:55:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:789d8f12-8ede-4244-89dc-cdffc50d45f3</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
What, exactly, do you mean by that?&lt;/p&gt;

&lt;p&gt;
Is there an error message? If so, what?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/93469?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 23:39:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:aba4a6d2-fb62-4895-a940-34d6fbe1a64d</guid><dc:creator>R.Kopsch</dc:creator><description>&lt;p&gt;&lt;p&gt;
Beside: Please enter your name at creating any ticket, thx&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LM3S1608</title><link>https://community.arm.com/thread/63855?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 23:37:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bce9d83f-0468-46e2-83ad-d025125b81e4</guid><dc:creator>R.Kopsch</dc:creator><description>&lt;p&gt;&lt;p&gt;
I just tested your code with one of our current examples
projects:&lt;/p&gt;

&lt;p&gt;
&amp;quot;...&lt;br /&gt;
int main (void) { char lastrec[10]; int kol_strok = 12; ...
lastrec[2] = (kol_strok / 4); lastrec[2] = kol_strok / 4; //&lt;br /&gt;
...&amp;quot;&lt;/p&gt;

&lt;p&gt;
Result: &amp;quot;.\Flash\Blinky.axf&amp;quot; - 0 Error(s), 1 Warning(s).&lt;br /&gt;
Compiler: Armcc.exe V5.05 update 2 (build 169)&lt;/p&gt;

&lt;p&gt;
Thus I can&amp;#39;t confirm your observation.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>