Author Topic: Visual C ++ errors  (Read 11095 times)

Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Visual C ++ errors
« on: August 21, 2015, 06:00:48 PM »
Hi:
I'm using Visual C ++ 2010 express with project  utasker v1.4.7 (date 03.05.2015) and leave the following errors:

utaskerv1.4\debug_hal.h(1127): error C2065: 'MAPPED_DEMO_LED_3' : undeclared identifier
utaskerv1.4\debug_hal.h(1133): error C2065: 'MAPPED_DEMO_LED_4' : undeclared identifier

I would appreciate help
Many greetings and thanks.
Carlos
Uncoma

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #1 on: August 21, 2015, 08:48:08 PM »
Hi Carlos

You have enabled FRDM_K64F in config.h.
but you haven't disabled NET_KBED (which was the board configured for in this version).

Ensure that only one target board is enabled at the same time and then there will not be this compiler error.

Regards

Mark


« Last Edit: August 21, 2015, 10:07:29 PM by mark »

Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #2 on: August 21, 2015, 09:50:02 PM »
Hi Mark:
True, by not including NET_KBED disappeared errors. But now I aperece this error, when the link

LINK: fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

Many greetings
Carlos

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #3 on: August 21, 2015, 10:08:53 PM »
Carlos

That error has something to do with VisualStudio and not the project code.

Try a clean and rebuild since your environment looks to be corrupted in some way.

Regards

Mark



Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #4 on: August 22, 2015, 08:43:19 PM »
HI Mark:

You were right, the problem was installing the VS 2010 Express.

The problem was that my PC had installed Framework 4.5 and with the installation of VS 2010 C ++ Framework 4 installed.

Generating conflicts and did not end the compilation. Uninstall version 4.5 and stayed with version 4. And no more problems.

Many greetings and thanks.

Carlos
Uncoma

Offline phomann

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Homann Designs
Re: Visual C ++ errors
« Reply #5 on: August 23, 2015, 10:53:48 PM »
Hi,

Hi,

I came across this problem as well. It is because there are two copies of the file cvtres.exe

I ended up just changing the name of one of them. I found the solution on the web.

-----------------------------------------------------------------------------
It turned out that I had two versions of this utility. One at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe and one at C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe. After VS2012 install, the VS2010 version of cvtres.exe will no longer work. If that's the first one in your path, and the linker decides it needs to convert a .res file to COFF object format, the link will fail with LNK1123.

(Really annoying that the error message has nothing to do with the actual problem, but that's not unusual for a Microsoft product.)

Just delete/rename the older version of the utility, or re-arrange your PATH variable, so that the version that works comes first.
------------------------------------------------------------------------------

Cheers,

Peter

Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #6 on: August 24, 2015, 01:57:51 AM »
Hello Phomann:

Thank you very much for your collaboration.

I now have the problem that the simulation does not show a valid IP.
Say :
IP 0.0.0.0 : 00-00-00-00-00-00 (Resolving)
What can be the reason?

Thank you very much and greetings

Carlosl

Uncoma

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #7 on: August 24, 2015, 12:55:09 PM »
Carlos

Please delete the file

\Applications\uTaskerV1.4\Simulator\FLASH_KINETIS.ini

and restart the simulator.

The probable explanation for strange parameters is that the simulator was used with a different processor or with different settings and then the processor type was changed. Although the parameter in Flash (in that file) are marked as valid they may not fully match the project and so content be interpreted differently (eg. the IP address may be invalid or server settings not be as expected).

By deleting this file you force the project to start with default parameters again, which will always match.

Since (see application.c)
    12.02.2015 Automatically vaidate new setting if it is recognised that the backup set has been lost {97}
the default parameters are always saved to Flash on the first execution and not just when the user commands it, meaning that there will (almost) always be parameters in FLASH_KINETIS.ini.
Deleting this after each major change will ensure that they always match.

A second technique to ensure matching parameters after major changes (parameter or target modifications) is to increment the value ofPARAMETER_BLOCK_VERSION in application.h, which causes a new set of default to be taken.

Regards

Mark



Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #8 on: August 24, 2015, 04:53:27 PM »
Hi Mark:
You were right, deleting the file FLASH_KINETIS.ini, simulation began to improve. Now the IP is set by the Server, where I connected my PC.
Open a DOS window and do my IP ping, it responds OK.
But when I put that IP into a browser, not the start page appears on Web server (such as the uTaskerV1.4_Kinetis Fig2 / 1.0 PAG.7 manual says)

Another test: I commented the line 994 of file config.h, which is "defined USE_DHCP".
IP is now fixed and the value that is put in the file application.c line 430.
But when using the new IP on the broser , it says that the connection could not be established.

Many greetings
Carlos

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #9 on: August 24, 2015, 10:00:04 PM »
Carlos

Check that you have USE_TCP and USE_HTTP enabled.

Ping will work with only IP and ICMP (USE_IP and USE_ICMP and ICMP_PING) but the web server requires TCP and HTTP as well.

A browser will also react differently depending on the situation:
1. If there is no TCP it will try a few times and give up (error after maybe 20s of attempting)
2. If there is TCP but no HTTP then there will be a quick error mesage since TCP will send a TCP-reset back when it receives a connection attempt but finds no listener to handle it.
3. If there is an HTTP server it will respond either with a start page or with a 404 error (meaning that it has received the connection but the requested page doesn't exist).

Regards

Mark


Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #10 on: August 24, 2015, 10:38:26 PM »
Hi Mark:
SI ¡¡¡¡¡¡¡
I'm very happy.
Define missing "#define USE_TCP"
For a couple of days, I will not bother.
Many greetings
Carlos

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #11 on: August 25, 2015, 01:14:27 AM »
Carlos

The Ethernet part is built up so that it is easy to add or remove protocols. Removing UDP will remove all UDP base servicies and removing TCP will remove all TCP based services - but not affect each other. Then of course each higher level service (like HTTP, FTP, SNMP, SNMP etc.) can be enabled or disabled as required. Removing IP will remove almost everything since typical Ethernet based protocols are mainly IP based.

Sometimes when testing I remove TCP and maybe UDP (and so all higher layer services and applications) to reduce Ethernet to a minimum (in terms of code size too) so that I can easily test basic Ethernet operation (like Ping - with just IP and ICMP) and can add it back again with one or two defines when I need a fully working system.

Regards

Mark

Offline carlos789

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Visual C ++ errors
« Reply #12 on: August 27, 2015, 12:20:40 AM »
Mark:
I'm analyzing the performance of the board webserver FRDM-K64K, comparing with the operation in Visual Studio. I use an IP 192.168.0.8

The first difference is that the MAC address on the board is: 00-00-00-00-00-00. On the PC , I have the MAC  according to the line 429 in the "applications.c" file.
And I have my code // #define USE_DHCP and the board "DHCP_SERVER - enabled"

The second difference is that "FILE_404_CONTENT" does not appear when I want to open a browser webserver.

The third difference is when I run "copy_all", the result is:

************************************************************************
C:\Mark\nuevo\Applications\uTaskerV1.4\WebPages\WebPagesKinetis>ftp -s:"ftp.txt"
 -A -w:256 192.168.0.8
Conectado a 192.168.0.8.
220 Welcome KINETIS FTP.
331 Enter pass.
230 Log OK.
Inicio de sesión correcto para Administrador@COM-STG4.epen.com.ar
ftp> binary
200 OK.
ftp> dir
200 OK.
150 Data.
***********************************************************
It does not end the process.

Many greetings

Carlos
Uncoma

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Visual C ++ errors
« Reply #13 on: August 27, 2015, 11:16:46 AM »
Carlos

Please disabled SPI_FILE_SYSTEM in config.h.
I now understand that you are using the developer's version from 3.5.2015, which was configured for the NETKBED platform. This has an SPI Flash used to store the file system and so this define is enabled.
The simulator will simulate this, but a FRDM-K64F doesn't have it and will in fact crash each time a file system access is attempted - which explains the issues that you are seeing (with FTP and HTTP).

I am not sure about the MAC issue, but suspect that your board may have  something programmed in its Program-Once area.
In app_hw_kinetis.h there is the define MAC_FROM_USER_REG; this means that the MAC address is taken from there and not from the uParameterSystem. It can be set only once and never changed/deleted.
If you disable this define it will then default as in the case of the other settings, even if you happen to have a value already programmed there.

Regards

Mark