Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Custom memory views: (4 Items)
   
Custom memory views  
I'm trying to view an audio buffer in memory (which is a uint8_t* in the function), as an array of signed 16-bit 
integers. I can't do this with "display as array" & "cast to type", they seem to cancel each other out. Also, I can't 
get the memory view to display memory as signed 16-bit ints (only 32?)

Anyone know how to do this?
Re: Custom memory views  
Looks like display as array and cast to type not combinable. I sent a pr about it to CDT https://bugs.eclipse.org/bugs/
show_bug.cgi?id=217448.
Memory view does not seems to have Rendering for this either... 

Technically you can try to fix CDT code yourself, which is open source,
and submit a patch which they can accept... If you want us to do it you need to submit formal request through your 
support line.
Re: Custom memory views  
I got something working. Add this variable in Expression view (Add expression...) as 

(unsigned short [50])(buffer[0])

0 - is base offset
50 - is array length
 
where buffer is your uint8_t * buffer var

(It works in IDE 4.5 I did not check 4.0.1)
Re: Custom memory views  
And I find out how to do it in Renderings:
- Select Unsigned Integer Rendering
- Anywhere in the table do right click and select Format...
- In format dialog select Column Size - 2 (means 2 bytes per column) - That should achieve desired effect