Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Corey H.'s Content

There have been 4 items by Corey H. (Search limited from 25-April 23)


By content type

See this member's

Sort by                Order  

#40757 N+2 flashing woes - DfuSeDemo crashes

Posted by Corey H. on 02 December 2012 - 05:58 PM in Netduino Plus 2 (and Netduino Plus 1)

On my primary machine - Windows 7 64 bit, i had issues going through the flash steps laid out by Chris at : http://forums.netdui...-v421-update-1/

When it got to step 4, 4. Flash the attached .DFU file using the ST DfuSe Demonstrator application (included with STDFU Tester), I found the correct executable : DfuSeDemo.exe, however, upon running it, it would immediatly crash. It did not matter whether or not it was in administrator mode or the many different compatibility settings that I tried, every time, it would crash instantly.


Looking up on the DFuse code, it appears there is a problem with the HID enumeration, or something along those lines. Below are two links that I found along these lines.


https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FDfuSe%20Demonstration%20crashes&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=870


http://code.google.com/p/dsonano/issues/detail?id=5


So, I did remove every USB device I could ( including a USB hub) , but I still got the same error. My mouse and keyboard are still attached as they are both USB.


I also tried to build the DfsSeDemo app with the source code that came with the install, however, I did not have DevStudio 8 and it upgraded the project to 2010. There seemed to be issues with the source code, or the Devstudio version difference:


2>nafxcwd.lib(afxglobals.obj) : error LNK2005: "public: virtual __thiscall CMemDC::~CMemDC(void)" (??1CMemDC@@UAE@XZ) already defined in TextProgressCtrl.obj
2>../Binary/Debug/DfuSeDemo.exe : fatal error LNK1169: one or more multiply defined symbols found


Next, I tried downloading the version of DfsSeDemo in one of the links. It would run without crashing, however, it stated that it was version 3.0.0 and the one that was provided was 3.0.1.0. But still I tried that. The program appeared to work, however the upload was "very fast" as opposed to taking a few minutes as per the instructions.


At this point, (thanks to some nudging from the chat community, I tried the steps on a different machine. I was able to use a 10 year old machine with XP to successfully load the firmware (Version: 4.2.1 Update 1 ). This tells me that I actually can follow the instructions provided ( sometimes an issue :-D), but it also tells me that my primary machine has something on it that is causing the crash.


I thought I would share my experience ( and work around) in case anyone also runs into this issue. Also, if there is something I could try so that I could use my primary machine to update the firmware rather than my 10 year old machine, that would help my sanity as just logging onto that old box tests my patience :-D.


Thanks,


Corey



#33737 TinyCore won't load

Posted by Corey H. on 16 August 2012 - 01:48 AM in Beta Firmware and Drivers

Case 1 - just referneceing TinyCore in your main project baloons the size up

Incrementally deploying assemblies to device
Deploying assemblies for a total size of 64856 bytes
Assemblies not successfully deployed to device.
Deployment to the device was not successful.


For Case 2 - if you have a class library project. Even if that other project includes TinyCore, it does not get pulled in unless you reference EventHandler in the class library project



        public TinyCLRTest()
        {
        }

        public void DoTest()
        {
            // I really don't need to do anything
        }

        //EventHandler OnError;


So For Case2, uncomment the line


EventHandler OnError;
<br class="Apple-interchange-newline">
This will cause your deployment to go From:


Incrementally deploying assemblies to device
Deploying assemblies for a total size of 1456 bytes
Assemblies successfully deployed to device.


To :


Incrementally deploying assemblies to device
Deploying assemblies for a total size of 65208 bytes
Assemblies not successfully deployed to device.
Deployment to the device was not successful.

Long Story Short: TinyCore is not so tiny...


Corey

Attached Files




#33677 TinyCore won't load

Posted by Corey H. on 15 August 2012 - 02:31 PM in Beta Firmware and Drivers

Hi Corey and welcome to the forums.

Are you sure you only commented out that single line? I'm curious because of this:


That one line appairently makes a difference of 63880 bytes, which is a lot. With a Netduino Plus it's reaching the code memory limitation that way.


Yes, I went back and forth around 5 times verifying it. The fact that this was "odd" is why I mentioned it. I was originally porting a "non-micro framework" project that interacts through a serial port to the "micro framework" and was stumped when it would not deploy. I then removed every class and added items back one at a time until it no longer deployed. THen commented out items in that class until it deployed. The key to the size was referencing the EventHandler class. That is when I noticed that just referencing the event handler in the code caused the deployment size to become very large. There must be some dependent references where if you include that, other assemblies may be referenced or an issue with how the Netduino is loading that assembly.

I can try to pull together a solution that shows just that problem tonight when I get home.

Corey



#33637 TinyCore won't load

Posted by Corey H. on 14 August 2012 - 11:52 PM in Beta Firmware and Drivers

I also ran into the same file and it resulted in the size of the deployment growing significantly, so your first inclination is correct.

I could leave the reference to tiny core in there if I commented out all references to event handler...


//        public event EventHandler OnError;
Everything deploys just fine:


Incrementally deploying assemblies to device
Deploying assemblies for a total size of 14728 bytes
Assemblies successfully deployed to device.


Add the line to one of your classes:

public event EventHandler OnError;

Incrementally deploying assemblies to device

Deploying assemblies for a total size of 78608 bytes
Assemblies not successfully deployed to device.
Deployment to the device was not successful.

When I remove the reference to TinyCore, I get compile errors on EventHandler. Other than your idea of creating another handler, I don't know the workaround.

Something in that class is causing the size of the deployment to balloon up. Is this expected behavior or is this a bug?( N+ 4.2 app)




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.