Page 2 of 2

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Fri Sep 07, 2018 2:22 pm
by Elinux
RJ45 cable for each on the same network

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Fri Sep 07, 2018 3:33 pm
by Elinux
Otherwise I use a switch

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Mon Sep 10, 2018 3:26 am
by AussieSusan
You need to read up on how to use the debugger.
It will not show you anything by default - you will need to set breakpoints and examine the variables as the code executes.
Have you checked that the MCU is sending signals to the Ethernet interface?
Susan

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Wed Sep 12, 2018 9:36 am
by Elinux
Hello Susan,

I think the code is not fully loaded! in fact, on my PIC32 ESK card there is a DEBUG LED which blinks when the program is loading, then stops when the program is fully loaded, for my part, when I load a simple program like to light an LED, the program will load and the DEBUG LED will stop blinking when it is fully charged, but when I load the berkeley_tcp_server.X program, it starts to load, the LED flashes and then freezes and stays on! so I think the code is not fully loaded! :?: Is this a hardware problem?

Thank you

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Thu Sep 13, 2018 4:04 am
by AussieSusan
I suspect that the "debug LED" you are referring to is attached to the on-board debugger/programmer (a PIC24FJ256GB106 if you are using the board I think you are) and is probably telling you that it is loading a program. The fact that it turns off may well mean that you have loaded a 'release' mode program and so it gets out of the way to let the main code run on the PIC32 MCU.
You will need to look at the messages that the programmer is sending to the IDE to tell if the program is all there. You will either get a message saying that programming completed successfully or you will get error messages. Can you show us what you are getting from the IDE when you load your 'LED flashing' program and when you load your other program?
Susan

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Thu Sep 13, 2018 9:37 am
by Elinux
Hello,

I have 3 tabs on what MPLAB displays to me (see attachment):

note: On the other hand for the project of the lighting of LED, I did not use Harmony, I created a standard project with a single file source

Project Loading Error:
Code: Select all
Error: Project "berkeley_tcp_server" refers to file "sys_wdt_local.h" which does not exist in the disk. The project failed to load.


berkeley_tcp-server(build,load,...):
Code: Select all
make -f nbproject/Makefile-pic32mx_eth_sk2.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/microchip/harmony/v2_06/apps/tcpip/berkeley_tcp_server/firmware/berkeley_tcp_server.X'
make  -f nbproject/Makefile-pic32mx_eth_sk2.mk dist/pic32mx_eth_sk2/production/berkeley_tcp_server.X.production.hex
make[2]: Entering directory 'C:/microchip/harmony/v2_06/apps/tcpip/berkeley_tcp_server/firmware/berkeley_tcp_server.X'
make[2]: 'dist/pic32mx_eth_sk2/production/berkeley_tcp_server.X.production.hex' is up to date.
make[2]: Leaving directory 'C:/microchip/harmony/v2_06/apps/tcpip/berkeley_tcp_server/firmware/berkeley_tcp_server.X'
make[1]: Leaving directory 'C:/microchip/harmony/v2_06/apps/tcpip/berkeley_tcp_server/firmware/berkeley_tcp_server.X'

BUILD SUCCESSFUL (total time: 61ms)
Loading code from C:/microchip/harmony/v2_06/apps/tcpip/berkeley_tcp_server/firmware/berkeley_tcp_server.X/dist/pic32mx_eth_sk2/production/berkeley_tcp_server.X.production.hex...
Loading completed
Connecting to programmer...
Programming target...
Programming completed
Running target...


Starter Kits:
Code: Select all
Initializing...
Programming Target...
No properties found for project. Programming all memories
Erasing device
Writing boot and config memory
Writing program memory
Programming succesfully completed.
Exiting...done

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Fri Sep 14, 2018 4:02 am
by AussieSusan
I'm not sure where each of those display s comes from (you really should do one thing at a time, generally starting from something simple and working up from there).

Re 'Project Loading Error": I can't tell from just the one line where that error comes from but it strikes me as very odd that references to loading a project (which generally means copying the application binary from a hex file into the MCU's memory) should be to a ".h" file which is typically 'C' language header file read in by the compiler. This makes me thing that you may have a rather corrupted project file. I'm also guessing that the file that it is referring to as missing relates to the watchdog timer (typically abbreviated to WDT). I would expect this sort of error message to come from the compiler but I would need to see the lines that would surround this (as per your next image).

Re 'berkeley_tcp-Server": that looks like a fairly typical compile/link/program cycle but I see that it is telling you that nothing has changed in the source files since the hex file was created and so it is simply loading in the old hex file. The fact that it says 'Running target...' indicates that the IDE is loading a 'Release' build which cannot link back to the IDE debugger.

Re 'Starter Kits': I must admit that I've not seen that before but again it would appear to be part of the loading process (not sure what it is loading!) but the 'No properties found for project' suggests that this might not be a standard application but be something special such as a bootloader (but I could very well be very wrong on this).

I can't help getting the feeling that you are out of your depth at this point. I really do suggest that you go back to a much simpler program so that you fully understand the edit/compile/link/program/debug cycle and then move forward to your ultimate goal. Also spend some time learning about the debugger as it will be of great help to you in situations you will encounter later on.
Also you should look for whatever documentation you can find about the code you have picked up - there will probably be installation guides, application notes and the like that will tell you if you need to edit a file to suit your hardware, what code you need to add (if any) and how to build the complete app.

Susan

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Wed Sep 19, 2018 10:09 am
by Elinux
Hello susan,

I tried all possible cases, and I did not find the problem, so as the only programs that I managed to run (turn on an LED) walk without using Harmony, so I said, that can be the problem come from the! so I would like to create a simple project (Client / Server) without going through harmony, and if that does not work, I would deduce that it is a material problem.

Having no experience in programming PIC, I created a topic on this forum for me to focus on the creation of this project without going through harmony - here is the link to this topic (viewtopic.php?f=69&t=673)

Thank you

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Fri Sep 28, 2018 9:46 am
by Elinux
Hello,

:idea: There is a tool in harmony (tcpip_discoverer) that allows to test the presence of microchip products, it allows sending a broadcast request to the network to receive the product information (MAC, IP, ..)

I launched tcpip_discoverer and I saw that it receives nothing on his console so I visualized with the wireshark, and I saw that the tcpip_discoverer sending a broadcast address but the ESK does not answer! so I deduced that it does not work!

So, I ordered an ESK II, and I received it today, I tried all the demos, and she walk all!

I launched tcpip_discoverer and received the MAC address, IP, hostname of ESK II (192.168.1.23)

Thank you Susan for your help :D

Re: Create an Ethernet project with MPLAB Harmony that works

PostPosted: Wed Oct 03, 2018 9:10 am
by Elinux
Hello everyone,

The answers to my questions are on the same topic as this one I posted on the microchip forum, here is the link (https://www.microchip.com/forums/m1069568.aspx).