Page 1 of 1

MIAC dsPIC

Posted: Sat Jun 23, 2018 1:57 pm
by Monie Jacobsen
MIAC dsPIC

I get following error messages when i compile my code (See attachment)

Could somebody be helpfull to solve or anwser why i get these error messages.
I recive this error message at the end of the compiling.
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1

I have attaced the project file, so you could look in the code and maybe solve the problem.
In Flowcode v7, the codes work, but not in Flowcode v8, what is the problem here?

Error messages attached:
errorMessage.txt
(226.39 KiB) Downloaded 198 times
Project file attached:
MIAC dsPIC SolarTrack.fcfx
(161.32 KiB) Downloaded 198 times

Re: MIAC dsPIC

Posted: Sat Jun 23, 2018 3:25 pm
by jgu1
Hi Monie!

Finally you managed to FC8. :D

AS far I see, there is no EEprom in the device you use. I don` t Think it is a bug.

And by the way, have you downloaded all the toolchain from here ;

https://www.matrixtsl.com/flowcode/download/ Anyway you need to install these for all the devices you bougth.

Br. Jorgen

Re: MIAC dsPIC

Posted: Sat Jun 23, 2018 3:33 pm
by Monie Jacobsen
Hej Jørgen

Jeg er lige kommet på med Flowcode 8
Det var en fejl at jeg først fik programmet i går.
Jeg vil straks se web-linket..
Tak Jørgen
Har hente alt værktøj...

GO'Weekend

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 9:13 am
by LeighM
Hi Monie,

Just to confirm what Jørgen posted,
this MIAC dsPIC SolarTrack.fcfx looks like an old one with bugs that have since been fixed,
so if you remove the internal EEPROM component and fix the MONTH_DAYS array, it compiles OK

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 10:44 am
by Monie Jacobsen
Hi LeighM
Ok I try what you describe of corrections for MIAC dsPIC to run again.
Returns with info ;-)

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 11:16 am
by Monie Jacobsen
Hi LeighM
I am using Miac GPS with MIAC dsPIC
In PIC MIAC, MONTH_DAYS worked.
So how should I repair the MONTH_DAYS array ????

Have deleted EEPROM, but how should I save data ??
Has deleted EEPROM!
Attach file:
MIAC dsPIC SolarTrack-001.fcfx
(157.73 KiB) Downloaded 228 times

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 11:26 am
by LeighM

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 12:52 pm
by Monie Jacobsen
Hi LeighM
Then I correct the codes after your link ;-)
How to set up for the Serial eeprom using MIAC dsPIC?
Which port should I use for MIAC dsPIC?
Look here:
Serial_eeprom.JPG
Serial_eeprom.JPG (40.5 KiB) Viewed 4316 times
Attached update codes:
MIAC dsPIC SolarTrack-002.fcfx
(160.66 KiB) Downloaded 191 times
Men nu kan jeg upload coderne til MIAC dsPIC.
There are still some errors!
Compiler messages:

Code: Select all

Target folder: C:\Users\Bruger\Desktop\TILFOR~1
Source name:   C:\Users\Bruger\Desktop\Til Forum\MIAC dsPIC SolarTrack-002.fcfx
Title:         
Description:   
Device:        PIC16.33E.MIAC (dsPIC) System
Generated by:  Flowcode v8.0.0.6
Date:          Monday, June 25, 2018 12:22:21
Users:         1
Registered to: monie jacobsen
License key: X6U4U7
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat  "MIAC dsPIC SolarTrack-002" "C:\Users\Bruger\Desktop\TILFOR~1\" "33EP256MU806"

C:\Users\Bruger\Desktop\TILFOR~1>xc16-gcc -c -mcpu="33EP256MU806" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "MIAC dsPIC SolarTrack-002".c -o "MIAC dsPIC SolarTrack-002".o 
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
MIAC dsPIC SolarTrack-002.c: In function 'FCM_Display_Date':
MIAC dsPIC SolarTrack-002.c:2894:2: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/MIAC\MIAC_CAL_API.c:390:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c: In function 'FCM_Display_On_OFF':
MIAC dsPIC SolarTrack-002.c:2969:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/MIAC\MIAC_CAL_API.c:390:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:2986:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/MIAC\MIAC_CAL_API.c:390:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:3007:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/MIAC\MIAC_CAL_API.c:390:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:3024:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/MIAC\MIAC_CAL_API.c:390:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c: In function 'FCM_Solar_position':
MIAC dsPIC SolarTrack-002.c:3860:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:562:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:3861:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:562:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:3868:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:562:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:3869:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:562:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c: In function 'FCM_DayOfTheWeek':
MIAC dsPIC SolarTrack-002.c:5629:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5637:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5645:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5653:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5661:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5669:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c:5677:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:904:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC SolarTrack-002.c: In function '_T1Interrupt':
coff-cc1.exe: warning: _T1Interrupt PSV model not specified for '_T1Interrupt';
assuming 'auto_psv' this may affect latency

Compilation successful!

Launching the linker/assembler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_link.bat  "C:\Users\Bruger\Desktop\TILFOR~1\MIAC dsPIC SolarTrack-002" 33EP256MU806 33E


xc16-ld 1.26 (A)

Program Memory  [Origin = 0x200, Length = 0x2aa00]

section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------
.text                        0x200               0x8bc           0xd1a  (3354)
.const                       0xabc               0x690           0x9d8  (2520)
.text                       0x114c              0x45d4          0x68be  (26814)
.dinit                      0x5720                0x24            0x36  (54)

                 Total program memory used (bytes):         0x7fe6  (32742) 12%


Ivt Memory  [Origin = 0x4, Length = 0x1fc]

section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------
.ivt._T1Interrupt             0x1a                 0x2             0x3  (3)


Auxflash Memory  [Origin = 0x7fc000, Length = 0x3ffa]

section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------

                     Total auxflash memory used (bytes):              0  (0) <1%


Data Memory  [Origin = 0x1000, Length = 0x7000]

section                    address      alignment gaps    total length  (dec)
-------                    -------      --------------    -------------------
.nbss                       0x1000                   0           0x19a  (410)
.ndata                      0x119a                   0             0xe  (14)
.nbss                       0x11a8                   0             0x2  (2)
.bss                        0x11aa                   0            0x54  (84)

                 Total data memory used (bytes):          0x1fe  (510) 1%


Dynamic Memory Usage

region                     address                      maximum length  (dec)
------                     -------                      ---------------------
heap                             0                                   0  (0)
stack                       0x11fe                              0x6e02  (28162)

                 Maximum dynamic memory (bytes):         0x6e02  (28162)

Generating HEX file

C:\Users\Bruger\Desktop\TILFOR~1>xc16-bin2hex -omf=coff "C:\Users\Bruger\Desktop\TILFOR~1\MIAC dsPIC SolarTrack-002".cof 
Generating Assembler file

C:\Users\Bruger\Desktop\TILFOR~1>xc16-objdump -omf=coff -S "C:\Users\Bruger\Desktop\TILFOR~1\MIAC dsPIC SolarTrack-002".cof  1>"C:\Users\Bruger\Desktop\TILFOR~1\MIAC dsPIC SolarTrack-002".asm 
. .


HEX file creation successful!

Launching the programmer...
C:\Program Files (x86)\Flowcode v8\tools\mLoader\mLoader.exe  -miacdsp16 "MIAC dsPIC SolarTrack-002.hex"
Loading file...
File loaded from...
=> MIAC dsPIC SolarTrack-002.hex
File sending...
. . . .

File sent!


FINISHED

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 2:12 pm
by LeighM
Which port should I use for MIAC dsPIC?
Looks like you have the correct settings,
I'm not sure why those other pins have appeared, looks like a (minor) bug that can be ignored
There are still some errors!
No, they are just warnings and can be ignored :D

Re: MIAC dsPIC

Posted: Mon Jun 25, 2018 3:25 pm
by Monie Jacobsen
Hi LeighM

Thank you very much for your great help.
Have secured me a good backup.