Helpful ReplyHot!Porting from PIC32MX to PIC32MZ

Page: < 123 Showing page 3 of 3
Author
NKurzman
A Guy on the Net
  • Total Posts : 16559
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2018/11/12 07:57:35 (permalink) ☄ Helpfulby MarPICnus 2018/11/13 01:20:51
0
There is no easy path. You can start with an empty harmony project. Then match the harmony PLIB to you current code. But at that point you might as well use the newer TCP/IP stack. But at that point you are practically doing a new project.
But if you have the time and budget it may be worth it. Especially if you intend to do additional Pic32mz projects.

You other choice is to code the PIB functions you need for the PIC32MZ.
#41
MarPICnus
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2018/08/16 11:13:00
  • Location: 0
  • Status: online
Re: Porting from PIC32MX to PIC32MZ 2018/11/13 01:19:23 (permalink)
0
Thanx malaugh, your CPU initialization seems compact, the harmony version seems to jump around creating header files - something I don't really understand.
#42
Jim Nickerson
User 452
  • Total Posts : 5445
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2018/11/13 07:10:52 (permalink) ☄ Helpfulby MarPICnus 2018/11/14 04:26:55
0
I think if it is your intention to continue developing with the PIC32MZ and newer PIC's it will be worth your time to learn and embrace Harmony
#43
friesen
Super Member
  • Total Posts : 1991
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: online
Re: Porting from PIC32MX to PIC32MZ 2018/11/13 09:04:45 (permalink) ☄ Helpfulby MarPICnus 2018/11/14 04:26:54
0
Things I like about harmony:
The pin and oscillator tools.
 
Things I don't like:
There is a lot of code that is unreliable, and you will need to fix bugs.
 
My take is:  Use the libraries that don't exist elsewhere, but otherwise use raw register manipulations and write your own drivers where reasonable, like for example, build your own SPI and UART libraries, as 50 lines can do what 1500 lines are doing in harmony and its much easier to follow.
 
Honestly, I can't imagine complete reliance on unmodified harmony for a production application, if someone is doing it I'd like to know.

Erik Friesen
#44
MarPICnus
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2018/08/16 11:13:00
  • Location: 0
  • Status: online
Re: Porting from PIC32MX to PIC32MZ 2018/11/14 04:52:32 (permalink)
0
Hi, I'm still busy with Porting PIX32MX to PIX32MZ.
 
I worked from the TCP/IP demo running on PIC32MX. My plan is to strip the TCP/IP into its layers for future use.
  1. I  started to strip the PHY layer and got that running on the PIC32MX
  2. Then port the PHY layer to PIC32MZ, got rid of the PLIBS, setup the clock for the PIC32MZ
  3. Solved most errors in the compiler, I now have a lot of the same errors and can't find the way out.
Here is the list of errors:
 
It's all undefined reference to, type of errors.
  1. I do have the headers with prototypes of these functions.
  2. If I try to open the header in the code, I get Cannot open Element "Eth.h"
  3. All these functions only have a prototype and not c-code???
Is it a linker problem?
Is the c-code missing?
 
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Marinus/TCPIP_Stack_Microchip/Stack_Code/PHY_Layer Test_PIC32MZ.X'
make -f nbproject/Makefile-default.mk dist/default/debug/PHY_Layer_Test_PIC32MZ.X.debug.elf
make[2]: Entering directory 'C:/Marinus/TCPIP_Stack_Microchip/Stack_Code/PHY_Layer Test_PIC32MZ.X'
"C:\Program Files (x86)\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFH144 -fno-schedule-insns -fno-schedule-insns2 -D_SUPPRESS_PLIB_WARNING -I/pic32mz_ef_sk -I/system_config/pic32mz_ef_sk -I/system_config/pic32mz_ef_sk/framework -I/system_config/pic32mz_ef_sk/bsp -I../src -I../src/system_config/pic32mz_ef_sk -I../src/pic32mz_ef_sk -I../../../../../framework -I../src/system_config/pic32mz_ef_sk/framework -I../src/system_config/pic32mz_ef_sk/bsp -MMD -MF build/default/debug/Main.o.d -o build/default/debug/Main.o Main.c -DXPRJ_default=default -legacy-libc
"C:\Program Files (x86)\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFH144 -fno-schedule-insns -fno-schedule-insns2 -D_SUPPRESS_PLIB_WARNING -I/pic32mz_ef_sk -I/system_config/pic32mz_ef_sk -I/system_config/pic32mz_ef_sk/framework -I/system_config/pic32mz_ef_sk/bsp -I../src -I../src/system_config/pic32mz_ef_sk -I../src/pic32mz_ef_sk -I../../../../../framework -I../src/system_config/pic32mz_ef_sk/framework -I../src/system_config/pic32mz_ef_sk/bsp -MMD -MF build/default/debug/CPU_Init.o.d -o build/default/debug/CPU_Init.o CPU_Init.c -DXPRJ_default=default -legacy-libc
"C:\Program Files (x86)\Microchip\xc32\v2.10\bin\xc32-gcc.exe" -g -mdebugger -DPKOBSKDEPlatformTool=1 -mprocessor=32MZ2048EFH144 -o dist/default/debug/PHY_Layer_Test_PIC32MZ.X.debug.elf build/default/debug/Main.o build/default/debug/ETHPIC32ExtPhy.o build/default/debug/ETHPIC32ExtPhyDP83848.o build/default/debug/CPU_Init.o build/default/debug/eth.o -DXPRJ_default=default -legacy-libc -mreserve=data@0x0:0x37F -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,-D=__DEBUG_D,--defsym=PKOBSKDEPlatformTool=1,--defsym=_min_heap_size=44960,--defsym=_min_stack_size=2048,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="dist/default/debug/PHY_Layer Test_PIC32MZ.X.debug.map",--memorysummary,dist/default/debug/memoryfile.xml
build/default/debug/Main.o: In function `main':
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/main.c:138: undefined reference to `EthInit'
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/main.c:144: undefined reference to `EthRxFiltersClr'
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/main.c:145: undefined reference to `EthRxFiltersSet'
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/main.c:199: undefined reference to `EthMACOpen'
build/default/debug/Main.o: In function `_LinkReconfigure':
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/main.c:253: undefined reference to `EthMACOpen'
build/default/debug/ETHPIC32ExtPhy.o: In function `_PhyReadReg':
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/ethpic32extphy.c:63: undefined reference to `EthMIIMReadStart'
build/default/debug/ETHPIC32ExtPhy.o: In function `EthPhyRestartNegotiation':
c:/marinus/tcpip_stack_microchip/stack_code/phy_layer test_pic32mz.x/ethpic32extphy.c:100: undefined reference to `EthMIIMWriteStart'
 
Thanx for the help.
#45
friesen
Super Member
  • Total Posts : 1991
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: online
Re: Porting from PIC32MX to PIC32MZ 2018/11/14 05:05:26 (permalink) ☄ Helpfulby MarPICnus 2018/11/14 05:39:19
0
It's probably a library.a file and header. As an FYI, freertos has a demo for the mz that uses the + tcp stack, which I have switched to. At any rate, there is some eth driver code that may be of use.

Erik Friesen
#46
Page: < 123 Showing page 3 of 3
Jump to:
© 2018 APG vNext Commercial Version 4.5