chipKIT® Development Platform

Inspired by Arduino™

Need Linker Scripts for PIC32MX150F128B

Created Mon, 24 Jun 2013 10:40:33 +0000 by caroper


caroper

Mon, 24 Jun 2013 10:40:33 +0000

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

Mon, 24 Jun 2013 12:58:41 +0000

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

Mon, 24 Jun 2013 13:26:16 +0000

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

Fri, 17 Jun 2016 11:24:17 +0000

Hi Chris,

If you are still active on the forum.

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

Thanks


majenko

Fri, 17 Jun 2016 12:45:04 +0000

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.


JohnL

Fri, 17 Jun 2016 23:06:01 +0000

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


majenko

Fri, 17 Jun 2016 23:13:15 +0000

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.


JohnL

Sat, 18 Jun 2016 05:09:52 +0000

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


majenko

Sun, 19 Jun 2016 09:38:43 +0000

Ok, have a go with this one - see what it does.


JohnL

Sun, 19 Jun 2016 13:11:23 +0000

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


majenko

Sun, 19 Jun 2016 15:40:24 +0000

I have set it to have the Arduino-like bootloader-for-2-seconds-on-reset mode so there is nothing to "activate" for it - just reset at the right time or use the standard reset circuit (FT232's DTR -> 100nF Cap -> MCLR).

RA7 is the LED.

It should be running at 40MHz.