Need Linker Scripts for PIC32MX150F128B

caroper
Posts: 120
Joined: Sun Jul 24, 2011 12:12 am
Contact:

Need Linker Scripts for PIC32MX150F128B

Post by caroper » Mon Jun 24, 2013 11:40 am

I have been creating a new Board definition for the PIC32MX150F128B and I see there is no such linker script in the ..\cores\PIC32 folder.

I have made the assumption that the PIC32MX150F128B has an identical memory and SFR map to the PIC32MX250F128B, and as such have just copied and renamed the 2 files associated with it.

My Bootloader is based on the one for the PIC32MX250F128B and I have made no changes to the Flash allocation in the Bootloader, so I see no obvious reason for it not to work.

Is this a reasonable assumption or have I made a fatal error?

Cheers
Chris

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Need Linker Scripts for PIC32MX150F128B

Post by EmbeddedMan » Mon Jun 24, 2013 1:58 pm

Chris,

I believe, but I do not know for sure, that the 250 is a superset of the 150. I think the 250 may be 150 + USB, so as long as you don't try to use any USB registers, you should be OK.

*Brian

caroper
Posts: 120
Joined: Sun Jul 24, 2011 12:12 am
Contact:

Re: Need Linker Scripts for PIC32MX150F128B

Post by caroper » Mon Jun 24, 2013 2:26 pm

I did run a test by building a sketch with the DP32 selected as the board, and a MX150 with my UART Bootloader on the chip and it compiled and ran without a glitch.

It only tested Pin 13 to flash the LED and Serial1 to send a "Hello World!" and it worked fine. So no obvious error using the MX250 Linker with an MX150 Target.
I just would prefer to have a separate one defined for the sake of completeness and for others to build on if they design boards around the MX150.

I can't test with my target board definition yet as it is throwing java Script errors when I select the Board.

More debugging is called for.

Cheers
Chris

JohnL
Posts: 17
Joined: Tue May 20, 2014 9:07 am

Re: Need Linker Scripts for PIC32MX150F128B

Post by JohnL » Fri Jun 17, 2016 12:24 pm

Hi Chris,

If you are still active on the forum.

Did you finalize appropriate files to support your Uart bootloader for MX150F128B?

Thanks

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Need Linker Scripts for PIC32MX150F128B

Post by majenko » Fri Jun 17, 2016 1:45 pm

I recently added MX170 and MX270 support to the boot loader. I can craft you a new MX170 bootloader image if you want one.

We have support in the core for MX270 and MX250 with linker scripts, but not the MX150 or MX170 at the moment (well, there is MX150 without bootloader support available but that is of no use to you really).

However the memory layout differences between the MX150 and MX250 and the MX170 and MX270 are nil. The only difference is the inclusion of USB in the MX2xx series. So you can use the MX2xx linker scripts with the MX1xx boards quite happily (in theory).

There are a couple of MX2xx boards in the core already - the Fubarino Mini uses the MX250D (44 pin QFN) and the Lenny uses the MX270D (44 pin QFN). The DP32 uses the MX250B (28 pin DIP) as does the chipKIT Pi.

Any of those should be easy enough to adapt to the equivalent MX1xx chip.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

JohnL
Posts: 17
Joined: Tue May 20, 2014 9:07 am

Re: Need Linker Scripts for PIC32MX150F128B

Post by JohnL » Sat Jun 18, 2016 12:06 am

Thanks Majenko,

Yes, Uart bootloader for PIC32MX170F256 using internal RC oscillator would be great.
Advise which serial port is used, which pin is used for bootload activation and any pin/LED to indicate bootloader mode.
Does the bootloader have fixed baudrate , or is it set in boards.text file?

Smaller PIC32's with small 28 pin soic/dip and even 44 pin tqfp packages have plenty of memory and using internal RC oscillator can be very versatile and easy to set up.

Kind Regards

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Need Linker Scripts for PIC32MX150F128B

Post by majenko » Sat Jun 18, 2016 12:13 am

It has a semi-fixed baud rate. It starts out by default at 115200 baud, but there is an option to change it to faster / slower if you want (-B flag to pic32prog). I can also change the default. I guess for INTFRC having it slower by default would be more stable.

I can map the UART to (almost) wherever you want - so take a look in the data sheet under "I/O Ports" and select which UART you want mapped to which pin combination and I'll map it for you.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

JohnL
Posts: 17
Joined: Tue May 20, 2014 9:07 am

Re: Need Linker Scripts for PIC32MX150F128B

Post by JohnL » Sat Jun 18, 2016 6:09 am

Thanks Majenko,

Since I'm going to use internal oscillator where crystal pins will be free, can you set bootloader on UART1 RX1 at RA2(pin12), TX1 at RB4(pin11) for MX170F256B (28pin).

For uploading Baudrate.

I would ideally like to use Uart bootloader in some wireless OTA applications. I am currently using this with Cypress PSOC4 bootloader and zigbee type rf transceivers very well.
However, depending on wireless digital transceiver and environment, data is generally transmitted in packets with sometimes significant latency (>50ms) that obviously affects acknowledgement handshaking. Therefore, it would be nice if acknowledgement timing is generous for OTA uploading.
Anyway, not knowing how flexible your bootloader is in terms of acknowledgement timing. Can you set default for 38400 baud and will see how it goes and adjust if needed.

Kind Regards
John

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Need Linker Scripts for PIC32MX150F128B

Post by majenko » Sun Jun 19, 2016 10:38 am

Ok, have a go with this one - see what it does.
Attachments
EXAMPLE_MX1_FRCPLL.zip
(3.37 KiB) Downloaded 26 times
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

JohnL
Posts: 17
Joined: Tue May 20, 2014 9:07 am

Re: Need Linker Scripts for PIC32MX150F128B

Post by JohnL » Sun Jun 19, 2016 2:11 pm

Thanks Majenko,

Its a bit late here in Australia to test it tonight, but will try it in the morning.
How is the bootloading mode activated?
Assuming X input pin held high while reset?
Any pin pulsing (LED) to indicate bootloading mode?

Kind Regards
John

Post Reply