Helpful ReplyHot!Porting from PIC32MX to PIC32MZ

Page: < 123 Showing page 3 of 3
Author
NKurzman
A Guy on the Net
  • Total Posts : 17131
  • 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 : 14
  • Reward points : 0
  • Joined: 2018/08/16 11:13:00
  • Location: 0
  • Status: offline
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 : 5842
  • 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 : 2036
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2018/11/13 09:04:45 (permalink) ☄ Helpfulby MarPICnus 2018/11/14 04:26:54
4 (1)
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 : 14
  • Reward points : 0
  • Joined: 2018/08/16 11:13:00
  • Location: 0
  • Status: offline
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 : 2036
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
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
nigelwright7557
Super Member
  • Total Posts : 197
  • Reward points : 0
  • Joined: 2006/11/06 08:15:51
  • Location: 0
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2019/02/11 09:22:19 (permalink)
0
a2d is very different on mz.
usb works similarly.
 
#47
NKurzman
A Guy on the Net
  • Total Posts : 17131
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2019/02/11 09:33:05 (permalink)
0
nigelwright7557
a2d is very different on mz.usb works similarly. 

One is High Speed the other is Full Speed.
#48
AGL59
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2019/02/11 14:04:07 (permalink)
4 (1)
Hi,
 
2 years ago, I made a nice project of digital processing with a PIC32MZ, without Harmony. Using SPI, UART, I2C, OC, timers, DMA for most of this peripherals... If you don't need things like USB and TCP/IP, there is no problem to stay away from Harmony, and it will be much more faster if you come from MX. ADC is the peripheral with major changes and which will need carreful read of documentation.
#49
nigelwright7557
Super Member
  • Total Posts : 197
  • Reward points : 0
  • Joined: 2006/11/06 08:15:51
  • Location: 0
  • Status: offline
Re: Porting from PIC32MX to PIC32MZ 2019/02/13 09:26:38 (permalink)
0
I just copied across the usb code from a pic32mx to pic32mz and it sort of worked ok.
I found a bug in it where I have to access a buffer before the usb will work !
Very strange.
Another oddity is if I exit my PC program the usb locks up after 10 seconds and I cant access the pic via usb anymore until I power down then up again.
 
#50
EmbeddedEngineer
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2016/02/24 06:56:35
  • Location: 0
  • Status: offline
how to port PIC24FJ256DA210 code on PIC32MZ2048EFM100 (The code is long and comprehensive) 2019/03/16 08:11:56 (permalink)
0
which is the good and easy way to convert pic24fj da code to pic32mz EF family. please help me thanks thanks
#51
mbrowning
Just a Member
  • Total Posts : 1280
  • Reward points : 0
  • Joined: 2005/03/16 14:32:56
  • Location: Melbourne, FL
  • Status: offline
Re: how to port PIC24FJ256DA210 code on PIC32MZ2048EFM100 (The code is long and comprehens 2019/03/16 08:26:30 (permalink)
5 (1)
The good way is to read the applicable datasheets and reference manuals and use the knowledge gained to carefully design the new version.

The easy way is to pay someone else to do it.

Time or money - which is most valuable to you?

Oh well - there's always next year
#52
NKurzman
A Guy on the Net
  • Total Posts : 17131
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: how to port PIC24FJ256DA210 code on PIC32MZ2048EFM100 (The code is long and comprehens 2019/03/16 09:51:29 (permalink)
0
1. Start a new thread.
2. What hardware is in the current project and what do you need in the new one? You have graphics in the pic24, are you planing graphics? Internal or external controller.
How elaborate are the current screens? Are you planning usb? Ethernet?
There is a possibility that you will need to start a new project and can only copy prices of you old code to the new project.
#53
Page: < 123 Showing page 3 of 3
Jump to:
© 2019 APG vNext Commercial Version 4.5