Author Topic: Application using FAT Emulation  (Read 18892 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: Application using FAT Emulation
« Reply #15 on: May 02, 2017, 01:11:02 AM »
Chris

I'll go through some boards with Ethernet to see whether I find some that don't build.
The FRDM_K64F is always a good one to use since it is the one that is most tested on; in fact it is probably the best HW and used by many people - same K64 as on Teensy 3.5. Costs less that a Teens 3.5 but has in-build debugger, Ethernet, SD card, accelerometer and connectors.

If there is a crash after enabling Ethernet it is probably due to
    if ((PALR & 0x01000000) != 0) {                                      // {29}
        _EXCEPTION("Check that the own MAC address doesn't set the multicast bit!!");
    }

in the Ethernet initialisation.

Delete the file
FLASH_KINETIS.ini
and restart and it will then be OK.

This is because the Flash image will contain parameters from the previous chip/firmware version and the IP and MAC settings will not be there (or are random), which triggers this warning. _EXCEPTION() is an intentional "crash" to warn of a problem or potential issue.
Deleting the flash starts with empty parameters and so default IP and MAC settings will be used again.

Regards

Mark

Offline creitzel

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Application using FAT Emulation
« Reply #16 on: May 02, 2017, 03:21:07 AM »
Mark,

I'll try to go through them all again, and see if I can get you a list of the ones that aren't compiling.  :-)

Quote
If there is a crash after enabling Ethernet it is probably due to
    if ((PALR & 0x01000000) != 0) {                                      // {29}
        _EXCEPTION("Check that the own MAC address doesn't set the multicast bit!!");
    }
in the Ethernet initialisation.

That is exactly where it was throwing the error.  So, I'll delete the ini file, and see how that works for me.  :-)

Thanks for the help,

Chris

Offline creitzel

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Application using FAT Emulation
« Reply #17 on: May 02, 2017, 03:38:42 AM »
Mark, Here's a list of the ones that wouldn't compile for me:

TWR_K60N512
EMCRAFT_K61F150M
FRDM_K64F
TWR_K70F120M

they throw the following error messages into the output window:

Code: [Select]
Warning 1 warning C4138: '*/' found outside of comment c:\teensy\utaskerv1.4.11-kinetis-opensource\utasker\utfat\mass_storage.c 2129 1 uTaskerKinetis
Error 2 error C2059: syntax error : '/' c:\teensy\utaskerv1.4.11-kinetis-opensource\utasker\utfat\mass_storage.c 2129 1 uTaskerKinetis
Warning 3 warning C4723: potential divide by 0 c:\teensy\utaskerv1.4.11-kinetis-opensource\stack\dhcp.c 985 1 uTaskerKinetis

hope this helps,

Chris


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: Application using FAT Emulation
« Reply #18 on: May 02, 2017, 04:10:51 AM »
Chris

I have checked in fixes:
1. There was a */ at the end of a macro for the SD card in the TWR_K60N512 which I removed
2. I updated the DHCP version since I hadn't updated it fully after modifying the system TICK to us resolution rather than ms

All should build now without errors (and in VS without warnings).

Regards

Mark

Offline creitzel

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Application using FAT Emulation
« Reply #19 on: May 04, 2017, 03:18:57 PM »
Mark,

Yes, your fixes worked, and I was able to get a file uploaded to the simulated SDCard using FTP.  Sorry it took so long to get back to you, been busy this week, and haven't had much time to devote to this project. 

I'm probably going to be putting the uTasker side of this down for a bit, as my FRDM-K66F came in yesterday, and I'm exploring the dev toolchain for it, and debugging options, to get a stable platform to play with.  I'll let ya know if I need further assistance.

Thanks again for all of your help,

Chris

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: Application using FAT Emulation
« Reply #20 on: May 10, 2017, 04:34:14 PM »
Chris

You should be able to run the HS USB now on the FRDM-K66F.

See http://www.utasker.com/forum/index.php?topic=1939.0 because I had in fact broken the K66 HS USB configuration but it is working well now!

Regards

Mark

Offline creitzel

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Application using FAT Emulation
« Reply #21 on: May 12, 2017, 04:15:25 PM »
Thanks for the update Mark,

I've been away from the forums for a few days, setting up a dev ide, and toolchain for the FRDM-K66F.  Also had to setup the debugger etc.  I'm at a point where I think I've got that all ironed out now, and I'm starting to focus on the code that needs to be written.

I'm currently in the process of wading through the demo code, and programmers reference, to educate myself on the thing.  I will have to grab a new copy of uTasker at some point, and give it a go.  :-)

Chris