View unanswered posts | View active topics It is currently Tue Jul 29, 2014 11:06 pm






Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Unable to download successfully compiled program 
Author Message
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Unable to download successfully compiled program
I'm finding that in 3.02, some programs I'm moving forward from 2.26 compile up and carry over just fine, while others though they continue to compile just fine as they did in 2.26 (zero errors, though some warnings) now refuse to download to the NXT, and so I can't run them: when I hit F5, the 'download progress' flashes instantaneously on the screen, then the debugger is not entered. When I go look at the File Management utility, the program is not there. The problem has been observed on at least two RobotC 3.0 installations.

Has anyone else observed this problem?


Last edited by bobatk on Wed Sep 14, 2011 1:01 am, edited 3 times in total.



Tue Sep 13, 2011 10:24 pm
Profile
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Re: Unable to download successfully compiled program
In 2.26, there was a View / Preferences... option on the Compiler tab called "Incremental Download" which we always turned off. That option seems to be removed from 3.0. Might this be related? Is there a registry setting that can be used in its place to see if that affects the situation?


Tue Sep 13, 2011 10:32 pm
Profile
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Re: Unable to download successfully compiled program
FWIW: I still have 2.26 installed on the same machine on which I have installed 3.0. Is this a supported configuration?

Update: completely uninstalled 2.26, 3.0, and the NXT drivers. Rebooted. Reinstalled 3.0. Problem persists.


Last edited by bobatk on Wed Sep 14, 2011 12:21 am, edited 1 time in total.



Tue Sep 13, 2011 10:38 pm
Profile
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Re: Unable to download successfully compiled program
Problem verified on a second RobotC computer (this time 64 bit instead of 32 bit).


Tue Sep 13, 2011 11:52 pm
Profile
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Re: Unable to download successfully compiled program
Progress in diagnostics: 'managed to get some message logs:

I deleted all files in the File Mangement utility. Then defrag'd the file system. Free space listed is 115.2K. Yet hitting F5 to download and debug yields the following error (note the 'no linear space'). It's worth noting that the programs that continue to work are smaller than those that fail; I've attached the compiler stats for one that fails below.

Code:

346.141 destroy NXT Iterator

346.141 Start 'USB' search for create NXT Iterator (0 seconds)
346.145 create NXT Iterator
346.145 Iterator found 'USB0::0x0694::0x0002::0016530FC4D5::RAW'

346.145 Start create NXT handle for 'USB0::0x0694::0x0002::0016530FC4D5::RAW'...
346.149 ...Created NXT handle for 'USB0::0x0694::0x0002::0016530FC4D5::RAW'

346.153 Device Info: Name: "RGA"; BT Addr: 00.16.53.0F.C4.FF; Signal: 0/0/0/0; Free Flash: 121632

346.157 Device Info: Name: "RGA"; BT Addr: 00.16.53.0F.C4.53; Signal: 0/0/0/0; Free Flash: 121632
346.157 Opened connection to USB brick (RGA)

346.159 sendDirectCommand: 'getBatteryLevel' :Response: Voltage: 8.190 Volts

346.166 getVersion: Protocol: 1.124; Version: 9.01, ROBOTC Firmware

346.171 Send  Message **<SystemFunction>**; Function: <sysFuncBulkSysParmsWrite>
            nOpcodesPerTimeslice = 255/0xFF.
            bNoPowerDownOnACAdaptor = true/0x1.
            bFloatDuringInactiveMotorPWM = false.
            muxLowBatteryShutdown =  0.00 V.
            nOptimizeBluetooth = false.
            nBTStreamSwitchDelay = 100/0x64. ; length 33; 67  ...
            48 06 11 00 07 00 FF 11 00 27 00 01 11 00 73 00 00 11 00 5D 00 00 11 00 61 00 00 11 00 62 00 64
346.173 Reply message **<Reply to 'SystemFunction'>**; length 1: 67(98)

346.179 Send  Message **<SystemFunction>**; Function: <sysFuncBulkSysParmsRead [0x47]>; length 12; 67 47 03 11 00 01 11 00 25 11 00 00
346.181 Reply message **<Reply to 'SystemFunction'::sysFuncBulkSysParmsRead>**
            robotType = NXT/0x1.
            averageBatteryLevel =  8.19 V/0x2001.
            firmwareVersion = 9.1/0x385. ; length 14: 67(98) 03 01 00 00 00 01 20 00 00 85 03 00 00

346.189 sendDirectCommand: 'StopProgram'

346.199 Creating file handle 'AutoTele.rxe' object for Write (0x0FCB3E40)
346.201 Opening new file 'AutoTele.rxe' on NXT FAILED (xFFFDD489/-142199) 'NXT FW Err: 'No Linear Space''
346.201 Destroying file handle '0x0FCB3E40' FAILED (xFFFDD489/-142199) 'NXT FW Err: 'No Linear Space''

346.201 Start Destroy NXT object 'USB0::0x0694::0x0002::0016530FC4D5::RAW'...
346.201 ...Destroyed NXT object 'USB0::0x0694::0x0002::0016530FC4D5::RAW'
346.201 Closing communications link
346.201 'CCommLinkHandler' Destructor called
346.218 Destroying window


Here are the compiler stats:

Code:
Compile Statistics:  (AutoTele.c)
    0.351 Total Compile Time (seconds)
   44,832 Total code bytes, (after 15,574 bytes removed during optimization)
      853 Constant Pool Size (in bytes)
    5,992 Used memory locations (of 15000), 4 Tasks, 118 Procedures
   10,949 User Source file lines,    50,840 tokens
    6,109 System Include file lines, 26,132 tokens
        0 Errors, 103 Warnings, 20 Info Messages
                                 CPU     ......Lines/sec.....
                             Seconds         Total     Source
     Scanner/parsing: Setup    0.009     1,877,741  1,205,263
    Scanner/parsing: System    0.001    25,762,794  16,536,336
Scanner/parsing: User Files    0.142       120,461     77,320
            Code Generation    0.154       110,849     71,150
              Code Optimize    0.021       820,093    526,392
                      Total    0.351        48,550     31,162
    1,497 Total symbols added to symbol table
    1.067 Avg hash bucket depth (1.0 is best possible)


I guess the big question is: with 121632 bytes of free flash, why can't we find ~48K of linear space to store the bytecodes?


Wed Sep 14, 2011 12:34 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Unable to download successfully compiled program
You need to hit the "defrag" button in the File Management Utility.
Attachment:
Screenshot-2011-09-14_10.11.30.png
Screenshot-2011-09-14_10.11.30.png [ 58.13 KiB | Viewed 4619 times ]


After that it should work fine :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Sep 14, 2011 4:12 am
Profile WWW
Rookie

Joined: Sat Nov 27, 2010 1:44 am
Posts: 34
Post Re: Unable to download successfully compiled program
Thanks Xander. Unfortunately that doesn't solve the problem. Which, indeed, is a mystery.

Update: I wrote a little c# program to open a USB connection to the NXT, send it a Delete User Flash command (0xA0), then do a binary search of Open Write Linear commands (0x89) with different file byte count lengths to see what the largest linear file I could open is.

The result is 7840 (==0x1EA0), which is much smaller than the programs we were running last season. FWIW, it's 96 bytes shy of being 31 sectors worth in the NXT file system.

Moreover, if I do a new flash of the firmware, and don't delete any files by just do the binary search, I get the same result, the same maximum size.


Last edited by bobatk on Wed Sep 14, 2011 2:25 pm, edited 6 times in total.



Wed Sep 14, 2011 11:13 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Unable to download successfully compiled program
Can you do me a favour and mail the program? I'd love to see if I can reproduce it here.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Sep 14, 2011 1:43 pm
Profile WWW
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 601
Post Re: Unable to download successfully compiled program
We have received the problematic programs and are currently investigating the problem.

Thanks for reporting the issue!

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Thu Sep 15, 2011 9:33 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Unable to download successfully compiled program
This one had me stumped, especially the contiguous space error. Quite misleading!

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Sep 15, 2011 9:41 am
Profile WWW
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Unable to download successfully compiled program
I have been looking at this most of the evening. I have the very large file downloading now. I'm trying to clean up the changes so that it can get into the next release. However, there are many issues with the content of this program that I'll cover in another post.


Fri Sep 16, 2011 12:19 am
Profile
Rookie

Joined: Fri Apr 15, 2011 10:29 am
Posts: 37
Post Re: Unable to download successfully compiled program
Dick Swan wrote:
I have been looking at this most of the evening. I have the very large file downloading now. I'm trying to clean up the changes so that it can get into the next release. However, there are many issues with the content of this program that I'll cover in another post.


Still waiting for your discussion on the content of the program. :)


Fri Oct 07, 2011 7:51 pm
Profile
Rookie

Joined: Tue Nov 01, 2011 10:54 pm
Posts: 5
Post Re: Unable to download successfully compiled program
We are having the same exact problem. Code compiles ok without warnings or errors, but does not download to the NXT. Worked ok until we added in drive task code w/joystick header--code that has worked before. We removed most of the programs from the NXT as well as defrag'ed it, but that does not appear to help. We could really use some help here because we are completely baffled! Have attached our code.


Attachments:
tele_test_11-1.c [8.39 KiB]
Downloaded 373 times
Thu Nov 03, 2011 9:12 pm
Profile
Rookie

Joined: Tue Nov 01, 2011 10:54 pm
Posts: 5
Post Re: Unable to download successfully compiled program
Fixed! There is a new release (v2.2) of the HTMUX drivers that we installed and now all is well :-)

http://www.hitechnic.com/file.php?f=162 ... r-v2.2.zip


Sun Nov 06, 2011 12:17 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: Unable to download successfully compiled program
You can always download the latest version of my driver suite from the original source: [LINK].

Keep an eye on my blog for when I release a new version of the suite. Keep in mind that I cannot support any other version other than the latest one.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Nov 06, 2011 2:54 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.