ROBOTC.net forums
http://www.robotc.net/forums/

Unable to download successfully compiled program
http://www.robotc.net/forums/viewtopic.php?f=52&t=3465
Page 1 of 2

Author:  bobatk [ Tue Sep 13, 2011 10:24 pm ]
Post subject:  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?

Author:  bobatk [ Tue Sep 13, 2011 10:32 pm ]
Post subject:  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?

Author:  bobatk [ Tue Sep 13, 2011 10:38 pm ]
Post subject:  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.

Author:  bobatk [ Tue Sep 13, 2011 11:52 pm ]
Post subject:  Re: Unable to download successfully compiled program

Problem verified on a second RobotC computer (this time 64 bit instead of 32 bit).

Author:  bobatk [ Wed Sep 14, 2011 12:34 am ]
Post subject:  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?

Author:  mightor [ Wed Sep 14, 2011 4:12 am ]
Post subject:  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 10088 times ]


After that it should work fine :)

- Xander

Author:  bobatk [ Wed Sep 14, 2011 11:13 am ]
Post subject:  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.

Author:  mightor [ Wed Sep 14, 2011 1:43 pm ]
Post subject:  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

Author:  tfriez [ Thu Sep 15, 2011 9:33 am ]
Post subject:  Re: Unable to download successfully compiled program

We have received the problematic programs and are currently investigating the problem.

Thanks for reporting the issue!

Author:  mightor [ Thu Sep 15, 2011 9:41 am ]
Post subject:  Re: Unable to download successfully compiled program

This one had me stumped, especially the contiguous space error. Quite misleading!

- Xander

Author:  Dick Swan [ Fri Sep 16, 2011 12:19 am ]
Post subject:  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.

Author:  nateww [ Fri Oct 07, 2011 7:51 pm ]
Post subject:  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. :)

Author:  jwkelly [ Thu Nov 03, 2011 9:12 pm ]
Post subject:  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 513 times

Author:  jwkelly [ Sun Nov 06, 2011 12:17 am ]
Post subject:  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

Author:  mightor [ Sun Nov 06, 2011 2:54 am ]
Post subject:  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

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/