• AVR Freaks

Helpful ReplyHot!Bad generated code with Harmony v2.

Author
Nmaster88
Starting Member
  • Total Posts : 66
  • Reward points : 0
  • Joined: 2019/06/04 03:30:36
  • Location: 0
  • Status: offline
2019/07/05 07:22:38 (permalink)
0

Bad generated code with Harmony v2.

I found what i believe it's a bug on the generated code on Harmony v2 while tring to run the example of sdcard_fat_single_disk using a pic32mx470f512l.
In Pin Settings i try to configure RF5 as SDI1 and RF3 as SDO1
It gives this errors:
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value (OUTPUT_PIN_RPF3) not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value (OUTPUT_PIN_RPF3) not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value (OUTPUT_PIN_RPF3) not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value () not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
<HConfig>[Error] Value (OUTPUT_PIN_RPF3) not valid for enumerated type (PORTS_REMAP_OUTPUT_PIN)
 
Then i generate code, which doesn't have a 
PLIB_PORTS_RemapOutput(PORTS_ID_0, OUTPUT_FUNC_SDO1,  OUTPUT_PIN_RPF3);
in sys_ports_static.c
if i try to correct this, it gives errors. Says OUTPUT_PIN_RPF3 doesn't exist, the problem is i really need it to exist.
 
Is this really a bug or is it supposed to happen?

Attached Image(s)

#1
TS9
Super Member
  • Total Posts : 782
  • Reward points : 0
  • Joined: 2010/05/07 10:52:22
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/05 07:45:27 (permalink)
0
But It is not happened at my ends..
post edited by TS9 - 2019/07/05 07:58:21
#2
Paul PortSol
Super Member
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/08 04:40:31 (permalink)
0
Try doing it again but from a virgin project (new empty project). Things can get messed up if you have added/removed things in MHC.
#3
Nmaster88
Starting Member
  • Total Posts : 66
  • Reward points : 0
  • Joined: 2019/06/04 03:30:36
  • Location: 0
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/09 02:18:28 (permalink)
0
I'm using a 100 pin PIC32MX470F512L so the reason seems to be that pin RPF3 is not available for SDO1, another problem i found now is that for SDI1 i can't use RPF3, it means i have done a bad SD Card connector wiring.
 
Initially i had RPF3 -> SDI, and RPF5 -> SDO
post edited by Nmaster88 - 2019/07/09 04:56:23

Attached Image(s)

#4
Paul PortSol
Super Member
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/09 08:40:48 (permalink)
0
If that is a datasheet issue it would be good to submit a ticket, but check the errata file first.
 
#5
Paul PortSol
Super Member
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/09 08:42:33 (permalink) ☄ Helpfulby Nmaster88 2019/07/11 00:52:40
0
I've had MHC allow me to do things that the datasheet or errata says is wrong (in the fine print), submitting a ticket could get MHC updated. The datasheets are quite long and it can be difficult to see some of the nuances.
 
#6
Nmaster88
Starting Member
  • Total Posts : 66
  • Reward points : 0
  • Joined: 2019/06/04 03:30:36
  • Location: 0
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/10 14:58:22 (permalink)
0
Paul PortSol
I've had MHC allow me to do things that the datasheet or errata says is wrong (in the fine print), submitting a ticket could get MHC updated. The datasheets are quite long and it can be difficult to see some of the nuances. 


After checking the datasheet for the pic, that seems to be the case, there seems to be no RPF3 pin for both SDI1 and SDO1 function.

About the PIC32MX470F512L, can someone confirm if the following pins can be configured as SDI and SDO?
I've looked at input and output mapping

SDO1 -> RPD3

SDI1 -> RPF5

Can't test on my PCB because the pads of the sd card resistances got removed with so many soldering and removal of components.
#7
TS9
Super Member
  • Total Posts : 782
  • Reward points : 0
  • Joined: 2010/05/07 10:52:22
  • Status: offline
Re: Bad generated code with Harmony v2. 2019/07/10 23:18:32 (permalink)
0
Nmaster88
Paul PortSol
I've had MHC allow me to do things that the datasheet or errata says is wrong (in the fine print), submitting a ticket could get MHC updated. The datasheets are quite long and it can be difficult to see some of the nuances. 


After checking the datasheet for the pic, that seems to be the case, there seems to be no RPF3 pin for both SDI1 and SDO1 function.

About the PIC32MX470F512L, can someone confirm if the following pins can be configured as SDI and SDO?
I've looked at input and output mapping

SDO1 -> RPD3

SDI1 -> RPF5

Can't test on my PCB because the pads of the sd card resistances got removed with so many soldering and removal of components.

--Duplicated--
#8
Jump to:
© 2019 APG vNext Commercial Version 4.5