Using PIC32MX170 in a Firewing32

Discuss the Firewing development environment

Using PIC32MX170 in a Firewing32

Postby matherp » Wed Oct 07, 2015 11:10 am

Hi

I've been a long term user of Swordfish (same user name) and thought I'd have a look at Firewing as it supports the PIC32. Recently I've been working extensively with the Micromite (Interpreted Basic able to call compiled C-Functions) using the PIC32MX170F256B. This is basically the same chip as the MX150 but with double the flash and double the RAM.

I thought it should be possible to plug one of these into a Firewing32 card but there doesn't seem to be an "official" way to get it recognisable in the compiler.

The PIC32MX170 is only supported by MPLabX. This means the sysgen32 program won't work.

To get round this I copied pic32mx150f128b.bas to pic32mx170f256.bas and edited _maxrom and _maxrom

I've then included "Device=32mx170f256b" in one of the sample files but when I try and compile I get:

[ERROR] : ERROR - Unable to locate linker file (32mx170f256.ld)

How do I proceed?

Thanks

Peter
matherp
 
Posts: 4
Joined: Wed Oct 07, 2015 10:42 am

Re: Using PIC32MX170 in a Firewing32

Postby Coccoliso » Wed Oct 07, 2015 11:26 am

Hi,
I can answer for the missing file.. is the linker file under
Code: Select all
[Firewing Install Folder]\Bin\Toolsuite\Firewing32\gcc\pic32mx\link

But while admitting that then you can use the FW32 board you need to modify the bootloader if you want to load mpu via USB.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: Using PIC32MX170 in a Firewing32

Postby matherp » Wed Oct 07, 2015 11:27 am

UPDATE

I eventually found the location of 32MX150F128.ld and have created a version 32MX170F256.ld by editing kseg0_program_mem to be 0x3D000 and kseg1_data_mem to be 0x10000

now I get the error:

ERROR : [GCC] Unknown processor

so I'm still stuck. I have as far as possible created all the required files under gcc/pic32mx but always get the error
matherp
 
Posts: 4
Joined: Wed Oct 07, 2015 10:42 am

Re: Using PIC32MX170 in a Firewing32

Postby Jerry Messina » Wed Oct 07, 2015 5:24 pm

You need to have the following:
- a copy of XC32 v1.32 or later installed (1.32 was what I used)
- the Firewing XC32Toolsuite installed (http://www.firewing.info/pmwiki.php?n=F ... 2Toolsuite)

After installing XC32 and the XC32toolsuite, make sure the Firewing \Bin\Toolsuite\microchip32\tsMicrochip32.ini file points to your XC32 installation path, probably something like 'Path=C:\Program Files\Microchip\xc32\v1.32\bin'

In the Firewing IDE, select 'Compiler> Microchip32' to use the XC32 toolsuite instead of the standard Firewing32 toolsuite.

You should then be able to add 'device = 32MX170F256B' to your main .bas file and get things to compile
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: Using PIC32MX170 in a Firewing32

Postby matherp » Wed Oct 07, 2015 5:47 pm

Jerry

Thanks for the info, but I'm obviously missing something

My tsMicrochip32.ini after editing reads
Code: Select all
[application]
Name=Microchip XC32 1.33
Path=C:\Program Files (x86)\Microchip\xc32\v1.33\bin
GCC=xc32-gcc.exe
GCCBinToHex=xc32-bin2hex.exe


I get a banner up saying:
Microchip XC32 1.33 Toolsuite
Building, please wait

but it never finishes

UPDATE

It does finish after about 3 or 4 minutes but doesn't produce a hex file
matherp
 
Posts: 4
Joined: Wed Oct 07, 2015 10:42 am

Re: Using PIC32MX170 in a Firewing32

Postby Jerry Messina » Wed Oct 07, 2015 7:05 pm

[ERROR] : ERROR - Unable to locate linker file (32mx170f256.ld)

That's the error I get if I try and build using the Firewing32 compiler instead of Microchip32

- I'm using Firewing 1.0.0.7 B7
- I just downloaded and installed XC32 V1.33. Edited tsMicrochip32.ini so it's pretty much the same as yours.
- Like you, I created a device file 32MX170F256B.bas by copying 32MX150F128B.bas and changing _maxrom and _maxrom
(I didn't copy any linker .ld files... it'll use the standard mchip ones)

created a main.bas with the following:
Code: Select all
device = 32MX170F256B

Sub Main()
End Sub

Selected 'Compiler> Microchip 32' and then 'Build'. I get the 'Microchip XC32 v1.33 toolsuite window, I see the linker run, and then 'Compilation Success for 32MX170F256B (40MHz)'

The only thing that I know that's different in my setup is that I don't install anything into the default directories, and nothing under 'Program Files' or 'Program Files(x86)', but I doubt that's the issue.

It does finish after about 3 or 4 minutes but doesn't produce a hex file
It only takes 15 secs or so here, and I get a hex file
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: Using PIC32MX170 in a Firewing32

Postby matherp » Thu Oct 08, 2015 8:35 am

Still no good at my end - W10?

I'll try a clean install on a different computer and report back

Thanks

Peter
matherp
 
Posts: 4
Joined: Wed Oct 07, 2015 10:42 am

Re: Using PIC32MX170 in a Firewing32

Postby Jerry Messina » Thu Oct 08, 2015 9:45 am

Peter -

When you do the install, try avoiding folders with spaces in the path. I remember some folks on the mchip forums that had issues w/this, but I don't remember if it was the program path or just the projects path... some part of GCC didn't like it.
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am


Return to Development Environment

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x