Page 2 of 4
Re: [NXC] Memory Manager
Posted: 08 Mar 2011, 04:33
by mattallen37
muntoo wrote:Go to Edit->Prefrences->General->Uncheck "Use MDI mode" and restart BricxCC.
...
Thank you.
Re: [NXC] Memory Manager
Posted: 08 Mar 2011, 21:26
by nxtboyiii
Your code compiled successfully!
Re: [NXC] Memory Manager
Posted: 08 Mar 2011, 23:39
by muntoo
nxtboyiii wrote:Your code compiled successfully!
OK..., but what was the result when you ran it on the NXT? I meant a NXTScreen Screenshot(s).
Re: [NXC] Memory Manager
Posted: 14 Mar 2011, 03:33
by muntoo
Could someone please run the Attached .rxe files and provide NXT screenshots of what's displayed on the screen? Or at least say what appears? (Is it blank, does it give a runtime "Error!" (which kind?), or are there specific numbers, what are they, where are they, are they "random", etc.)
Thanks!
- v0_4.zip
- (29.8 KiB) Downloaded 225 times
Re: [NXC] Memory Manager
Posted: 14 Mar 2011, 10:04
by timpattinson
On my NXT (efw 1.31, build 2712101703) it still says Deleting memory. I took some videos using NXTScreen and uploaded them anyway in case I'm missing something
- Videos.zip
- NXTScreen - shots of the four .rxes
- (429.84 KiB) Downloaded 288 times
-Tim
ps. 7-Zip is awesome -and free - 39 mb to 429kb
Re: [NXC] Memory Manager
Posted: 15 Mar 2011, 00:14
by muntoo
timpattinson wrote:On my NXT (efw 1.31, build 2712101703) it still says Deleting memory. I took some videos using NXTScreen and uploaded them anyway in case I'm missing something
Videos.zip
-Tim
ps. 7-Zip is awesome -and free - 39 mb to 429kb
Thanks, I'm taking a look at the NBC code generated right now... (Perhaps get John Hansen to fix the bug [in the compiler!!!].)
P.S. 7-Zip rocks, but you're bound to get such a high compression ratio if you use AVI. Try MP4, H264, and others...
Re: [NXC] Memory Manager
Posted: 15 Mar 2011, 01:22
by muntoo
While I'm examining the NBC Code Listing (and doing my homework... I should get started), what does the attached .rxe do? This time, it should display at least 4 numbers.
Re: [NXC] Memory Manager
Posted: 16 Mar 2011, 05:14
by muntoo
Found some the bugs* (in my code
). (There may be more...)
Try this.
- v0_4.zip
- (34.63 KiB) Downloaded 215 times
It MUST display something... anything!
* They were in MM-Demo.nxc... They were from when I wasn't sure how to implement the program, so I just put some code to help me decide how it should look like. Mind you, the new code isn't pretty (I will fix it later), but it should get the job done. ...Even if the job is done badly.
Re: [NXC] Memory Manager
Posted: 17 Mar 2011, 15:15
by afanofosc
muntoo wrote:
(Perhaps get John Hansen to fix the bug [in the compiler!!!].)
Which bug in the compiler are you referring to here? Is it the #include problem you are having or something else?
John Hansen
Re: [NXC] Memory Manager
Posted: 17 Mar 2011, 16:02
by afanofosc
Here's the NBC code generated by the compiler for ptr.idx++:
Code: Select all
add __main_7qG2_ptr_7qG2_000.idx, __main_7qG2_ptr_7qG2_000.idx, __constVal1
Seems good to me.
// Report NXC Bug. Can't use "MM_ID ptr = myvar;"
I changed the code in task main to use the above construct and it compiled and generated valid code with the 1.2.1. r4. The MM_ID_CPY function also seems to generate correct code. But there is absolutely no reason to use a subroutine in this case. Just assign myvar to ptr. If that does not work correctly (i.e., mov one_struct, another_struct_of_the_same_type ) then there is a firmware defect.
John Hansen