chipKIT32 / PIC32-avrdude-bootloader

The 'new' bootloader for MPIDE/chipKIT PIC32 boards
44 stars 62 forks source link

Post-compilation command #3

Closed majenkotech closed 8 years ago

majenkotech commented 10 years ago

The post-compilation command to copy the .hex file to the bootloader images folder is a Windows specific command.

This breaks the compilation on people using a real operating system.

Why not just change the "ImagePath" in the project?

EmbeddedMan commented 10 years ago

Matt,

Yup, you're right. Keith and I are both Windows guys, so this didn't occur to us. Would you like to make this change and then issue a pull request, or would you like me to do it?

*Brian

On Tue, May 20, 2014 at 6:43 AM, Matt Jenkins notifications@github.comwrote:

The post-compilation command to copy the .hex file to the bootloader images folder is a Windows specific command.

This breaks the compilation on people using a real operating system.

Why not just change the "ImagePath" in the project?

— Reply to this email directly or view it on GitHubhttps://github.com/chipKIT32/PIC32-avrdude-bootloader/issues/3 .

majenkotech commented 10 years ago

I'm no MPLAB-X expert, so I don't know for certain the change would do what you want. I am assuming by what it looks like that it would, but some experimentation may be needed. There may even be a better way (I think this way may give you more files than you want), so who knows what the "best" way is...?

EmbeddedMan commented 10 years ago

I think if the goal is to keep everything (i.e. output file locations) the same, but make a copy of all HEX files and put them in a folder, then what we're currently doing is the best way to do it. However, we need a cross-platform way to do the copy rather than rely on a Windows only command. Or maybe there's a way to tell MPLAB X to make a copy as it does the final build of the HEX file. I'll look into it.

*Brian

On Tue, May 20, 2014 at 7:59 AM, Matt Jenkins notifications@github.comwrote:

I'm no MPLAB-X expert, so I don't know for certain the change would do what you want. I am assuming by what it looks like that it would, but some experimentation may be needed. There may even be a better way (I think this way may give you more files than you want), so who knows what the "best" way is...?

— Reply to this email directly or view it on GitHubhttps://github.com/chipKIT32/PIC32-avrdude-bootloader/issues/3#issuecomment-43621723 .

EmbeddedMan commented 8 years ago

OK, I've pushed a change from "copy" to "cp", as well as fixing the slash direction in the paths, for the post-build step. This should allow the post build copy step to run on Linux and Mac as well as Windows. I can't test on anything but Windows, but it still appears to work fine (with the "cp").

If somebody could please test this on Linux or Mac os and report back it it works or not, I'll close the issue if we can know that it works OK.

EmbeddedMan commented 8 years ago

I created a Linux VM, installed MPLAB X and XC32 v1.40, and confirmed that the change to "cp" does in fact work fine under Linux, as far as I can tell.