Author Topic: Newbie trying to compile uTasker for K60N512 kit  (Read 8071 times)

Offline zeppelin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Newbie trying to compile uTasker for K60N512 kit
« on: June 01, 2011, 02:33:35 AM »
Hi All,
    I am a newbie with Kinetis, uTasker, and Code Warrior, so please bear with me.   I think I have Codewarrior 10.1 set up and installed properly from the freescale website.  I have imported the project int CW using the PDF instructions from uTasker.  I get errors of "undefined identifier" when it gets to compiling the SNMP agent (I would be happy to remove SNMP support if I could figure out how):


Description   Resource   Path   Location   Type
make: *** [stack/SNMP/SNMPV2/snmpagent.obj] Error 1   uTaskerV1.4      line 0   C/C++ Problem
undefined identifier 'NO_UDP_SOCKET_FOR_SNMP'   snmpagent.c   uTaskerV1.4/stack/SNMP/SNMPV2   line 89   C/C++ Problem
undefined identifier 'NOT_SNMP_SOCKET'   snmpagent.c   uTaskerV1.4/stack/SNMP/SNMPV2   line 650   C/C++ Problem
undefined identifier 'SNMP_CLIENT_PORT'   snmpagent.c   uTaskerV1.4/stack/SNMP/SNMPV2   line 86   C/C++ Problem


Am I missing a header file somewhere?  Also, when trying to compile the Visual Studio project, I get this error:

 Generating Code...
1>  uTaskerV1-4.vcxproj -> C:\utasker\1.4\Applications\uTaskerV1.4\Simulator\.\uTasker___Win32_uTasker_STM32_plus_GNU_build\uTasker.exe
1>  'cs-make' is not recognized as an internal or external command,
1>  operable program or batch file.
1>  uTaskerCombine V1.1
1> 
1>  Input file 1 could not be found. Terminating

It appears to be depend on a make program I don't have.  I am running Windows 7 x64.   Any help would be appreciated, but please be very specific on the steps as these tools are so new to me.

Thank you,
z


P.S.  I wanted to try and load the binaries provided as well.... is there a freely available tool to flash these (app / bootloader)?



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Newbie trying to compile uTasker for K60N512 kit
« Reply #1 on: June 01, 2011, 11:20:18 PM »
Hi

The error that you are getting is when trying to compile stack/SNMP/SNMPV2/snmpagent.c. The files in SNMP/SNMPV1 and SNMPV2 are however not parts of the uTasker demo project (these are described here: http://www.utasker.com/forum/index.php?topic=866.0).
So the question is why CW10.1 is trying to compile them...?

There are, as are directories associated with the simulator, excluded from the build (or at least should be) so you can probably correct it by selecting the SNMP directory and excluding its contents by right-clicking the mouse and commanding "Exclude from build...", then selecting all targets.

Note: I also found that I had the same problem with my latest version - this exclude had obviously disappeared - after excluding the project was OK again.

I'll not make any secret of the fact that I don't like working with CW10 (CW7 is fine for me though) or any other Eclipse based IDEs. They tend to be a nuisance - so slow, and difficult to control by a beginner. Another problem that often happens is that the managed make file that it uses is not always updated to match the local PC - in which case deleting the sub-directories \Applications\uTaskerV1.4\KinetisCodeWarrior\MK60N512VMD100_INTERNAL_FLASH etc. tends to force the make file to be regenerated, which solves this. I would love to work with external make files, which is possible, but after almost 3 years of fighting with Eclipse I still never got it working....



The second problem is more simple. The VS project has two targets, one simply for simulation and one for simulation plus GCC post build. If you select the pure simulation target the error will go away because it will then not try to build with GCC, which needs the GCC compiler for the processor to be installed. The GNU compiler can be obtained from www.CodeSourcery.com (lite version is OK when no debugging is required) and then the path in \Applications\uTaskerV1.4\GNU_Kinetis\Build_Kinetis.bat can be adjusted to match (if necessary).


CW10.1 contains a Flash programmer which can be used to load pre-built files. This can be started from the symbol which looks like a bolt of lightening (light blue) - using "Flash File to Target"


Regards

Mark



Offline zeppelin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Newbie trying to compile uTasker for K60N512 kit
« Reply #2 on: June 04, 2011, 09:42:34 PM »
Mark,
    Thank you for the detailed information.  I need to find the time to get back and do some more exploration, and I do agree that CW is feels awkward and slow.   I tried to use the flash programmer for CW10.1 generated output and that worked ok, but I was unable to upload the uTasker demo binaries.  Any tips or specific option I may have left out?

Thank you,
-z

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Newbie trying to compile uTasker for K60N512 kit
« Reply #3 on: June 06, 2011, 07:36:09 PM »
Hi

It may be that the binary loader requires MOTOROLA binary format (which is what CW10.1 generates) and so will not work with standard binary files (?).
If this turns out to be the case HEX files may be an alternative.

Regards

Mark