Search found 318 matches

by richard
Thu Jan 07, 2016 11:56 am
Forum: Development Tools and Programming
Topic: Parse error when including time.h
Replies: 4
Views: 13060

Re: Parse error when including time.h

<xs1.h> defines a clock type which represents a clock block resource. This clock "type" is actually a macro that expands to __clock_t which recognized as a builtin type by the xC compiler. The C standard library header <time.h> defines the clock() function, as required by the C89 standard....
by richard
Tue Oct 20, 2015 3:54 pm
Forum: Q&A
Topic: .globwrite directive is greater than 65535
Replies: 2
Views: 3411

Answer 3998

<r>The mechanism the tools use to check for parallel usage errors in xC limits the maximum constant index you can use to access a global array to 2^16. A simple example which errors is as follows:<br/> <br/> char a[0x10001];<br/> <br/> int main() {<br/>   a[0x10000] = 0;<br/>   return 0;<br/> }<br/>...
by richard
Wed Oct 14, 2015 9:57 pm
Forum: Other Applications
Topic: DFU safety and booting wrong image
Replies: 16
Views: 21057

Re: DFU safety and booting wrong image

However, I need for the DFU image to contain some unique identifying data that can be read by the bootloader. How much data do you need to identify the type of image? If the information can be packed in a small number of bits then you might be able to encode it in the version number of the flash im...
by richard
Wed Oct 14, 2015 9:40 pm
Forum: startKIT
Topic: XSCOPE Error: XN11049 Network positioning failed
Replies: 1
Views: 5511

Re: XSCOPE Error: XN11049 Network positioning failed

The standard .xn file for the XK-1A already includes an xscope link so there is no need to added a second xscope link to the .xn file. In particular you should be able to remove the following from your .xn file: <Link Encoding="2wire" Delays="4,4" Flags="XSCOPE"> <LinkE...
by richard
Sun Sep 13, 2015 8:39 pm
Forum: Q&A
Topic: 8 bit signed overflowing problem
Replies: 1
Views: 3863

Answer 3880

<t>My interpretation of what you are trying to do is as follows: implement a comparison function that returns whether the first timer value was sampled after the second, assuming that the first timer value was sampled no more than 128 timer ticks before / 127 timer ticks after the second value.<br/>...
by richard
Fri Sep 11, 2015 9:11 pm
Forum: Development Tools and Programming
Topic: how to reinterpret cast of "integer pointer" to "char array?
Replies: 2
Views: 3900

Re: how to reinterpret cast of "integer pointer" to "char ar

int data[100], *ptr = & data[0]; char byte = 0; (*ptr, char[])[5] = byte; // This doesn't work: "error: out of bounds array access" sizeof(*p) == 4. As a result you can only reinterpret it to a type of size 4 or less. If you reinterpret it as a array of char then the array will only h...
by richard
Thu Aug 13, 2015 12:48 am
Forum: Projects
Topic: Memory extender and/or virtual memory subsystem
Replies: 6
Views: 12488

Re: Memory extender and/or virtual memory subsystem

richard wrote:The app now hits the same issue you ran into, i.e. when a STW_l3r instruction causes an exception the st8 method is called instead of the stw method. I'll see if I can figure out what is going wrong.
There was an error in one of the lookup tables - I think it should be fixed now.
by richard
Wed Aug 12, 2015 9:57 pm
Forum: Projects
Topic: Memory extender and/or virtual memory subsystem
Replies: 6
Views: 12488

Re: Memory extender and/or virtual memory subsystem

I took another look at memory extender code. I noticed a bug in the kernel stack allocation which could have caused memory corruption - I've pushed a fix for this. I also extended the example app to try all combinations of load / store instruction. The app now hits the same issue you ran into, i.e. ...
by richard
Tue Aug 04, 2015 8:38 pm
Forum: Q&A
Topic: interface as select function argument
Replies: 2
Views: 4710

Answer 3630

<t>The syntax for calling a select function from a select is:<br/> <br/> case local_imp(mem);<br/> <br/> not<br/> <br/> case local_imp(mem): break;<br/>  <br/> The second syntax is used for calling transaction functions from a select, and transaction functions must have a channel end argument (which...
by richard
Tue Aug 04, 2015 2:27 pm
Forum: Projects
Topic: Memory extender and/or virtual memory subsystem
Replies: 6
Views: 12488

Re: Memory extender and/or virtual memory subsystem

I see you've already found sc_memory_extender, which contains code for handling a ET_LOAD_STORE exception. I wrote this code a while back, and I'd be happy to answer questions about it. You might also want to take a look at the following git repo: https://github.com/stevekerrison/sc_memkernel This r...