Jump to content

Recommended Posts

Have any one tested this bootloader with boostc?

 

I've been meaning to give it a try, but haven't gotten around to it yet. I've seen positive feedback from others that have used it standalone. I'll give it a shot in a few days.

Share this post


Link to post
Share on other sites

Amazing. These dudes have done the USB stack in assembler.

 

It looks like it bounces the interrupt high/low vectors from the normal addresses into the program at the same addresses above its origin - meaning that every interrupt takes another couple of clock cycles. Aside from that side effect, it's a neat way of not having to do tricky boot vector relocations.

 

Given that mplab compiles the program out of the box, there doesn't seem much point in porting it, esp given that its in assembler anyway. Just use it if it works for you.

 

cheers

Ian.

 

 

Have any one tested this bootloader with boostc?

 

I've been meaning to give it a try, but haven't gotten around to it yet. I've seen positive feedback from others that have used it standalone. I'll give it a shot in a few days.

Share this post


Link to post
Share on other sites
Amazing. These dudes have done the USB stack in assembler.

 

It looks like it bounces the interrupt high/low vectors from the normal addresses into the program at the same addresses above its origin - meaning that every interrupt takes another couple of clock cycles. Aside from that side effect, it's a neat way of not having to do tricky boot vector relocations.

 

Given that mplab compiles the program out of the box, there doesn't seem much point in porting it, esp given that its in assembler anyway. Just use it if it works for you.

 

cheers

Ian.

 

 

Have any one tested this bootloader with boostc?

 

I've been meaning to give it a try, but haven't gotten around to it yet. I've seen positive feedback from others that have used it standalone. I'll give it a shot in a few days.

 

 

What settings ect need to be done in boostc to use it?

 

BR /Jörgen

Share this post


Link to post
Share on other sites
Amazing. These dudes have done the USB stack in assembler.

 

It looks like it bounces the interrupt high/low vectors from the normal addresses into the program at the same addresses above its origin - meaning that every interrupt takes another couple of clock cycles. Aside from that side effect, it's a neat way of not having to do tricky boot vector relocations.

 

Given that mplab compiles the program out of the box, there doesn't seem much point in porting it, esp given that its in assembler anyway. Just use it if it works for you.

 

cheers

Ian.

 

 

Have any one tested this bootloader with boostc?

 

I've been meaning to give it a try, but haven't gotten around to it yet. I've seen positive feedback from others that have used it standalone. I'll give it a shot in a few days.

 

 

What settings ect need to be done in boostc to use it?

 

BR /Jörgen

 

 

In order to get a program bootloaded, I would expect you would compile it with -rb 2048 in the options / linker params.

 

cheers

Ian.

Share this post


Link to post
Share on other sites

I have start playing around whit the bootloader. I can download my program but it does not start. I have compiled a simple program that flash some leds. It works if I flash it to the PIC18F2550 with out the bootloader. I then recompile it with -rb 2048 option and use the bootloader then it does not start. Any ides what I am doing wrong?

 

/Jörgen

Share this post


Link to post
Share on other sites

I have it working whit a simple program but when I try more complex program it fails. I think it´s because bootloader use extended instructions. Is this correct way to redefine interrupts vector?

 

void interrupt( void )@0x808{

}

 

void interrupt_low( void )@0x818 {

}

Share this post


Link to post
Share on other sites

sdujolo,

I have it working whit a simple program but when I try more complex program it fails. I think it´s because bootloader use extended instructions. Is this correct way to redefine interrupts vector?

 

void interrupt( void )@0x808{

}

 

void interrupt_low( void )@0x818 {

}

No this will not work as the interrupt routines are jumped to from 0x808 and 0x818, the routines themselves do not reside at these addresses.

-rb 2048 ( or -rb 0x800 ) will relocated the whole program, including putting the required jumps in at 0x808 and 0x818 for the interrupt routines.

 

Regards

Dave

Share this post


Link to post
Share on other sites
sdujolo,
I have it working whit a simple program but when I try more complex program it fails. I think it´s because bootloader use extended instructions. Is this correct way to redefine interrupts vector?

 

void interrupt( void )@0x808{

}

 

void interrupt_low( void )@0x818 {

}

No this will not work as the interrupt routines are jumped to from 0x808 and 0x818, the routines themselves do not reside at these addresses.

-rb 2048 ( or -rb 0x800 ) will relocated the whole program, including putting the required jumps in at 0x808 and 0x818 for the interrupt routines.

 

Regards

Dave

 

 

Hi Dave and thanks for your answer. I figure out that to when I stated to check asm files. I have tried with just -rb 2048 optiion and that works with my simple flashing some led program but not with my NOVO program. I have figure out the when not using the bootloader it only works if I have "Extended instr.Set" disabled. The bootloader need "Extended instr.Set" enabled is there any work around? But that does not look as the entire problem beacuse when I have "Extended instr.Set" enabled with out bootloader it print text on LCD and then stop but with bootloader nothing happen.

 

Best regards /Jörgen

Share this post


Link to post
Share on other sites

sdujolo,

...

Hi Dave and thanks for your answer. I figure out that to when I stated to check asm files. I have tried with just -rb 2048 optiion and that works with my simple flashing some led program but not with my NOVO program. I have figure out the when not using the bootloader it only works if I have "Extended instr.Set" disabled. The bootloader need "Extended instr.Set" enabled is there any work around? But that does not look as the entire problem beacuse when I have "Extended instr.Set" enabled with out bootloader it print text on LCD and then stop but with bootloader nothing happen.

...

The BoostC compiler for the PIC18 does not support the PIC18 extended instruction set, so to use code produced by it you must ensure that the extended instruction set is turned off. I don't know of a work around :-(

 

Regards

Dave

Share this post


Link to post
Share on other sites

I assume that BoostC_Pic18 must use the FSR2 register pair then. The competition has a work-around based on loading FSR2 with zero.

 

http://www.mikroe.com/forum/viewtopic.php?t=1859

 

How much work would it be to add an /xinst switch to the compiler that prevents system use of FSR2, zeros it on startup and adds code to the ISR context preservation to preserve it but zero it for the ISR?

 

It would then be the responsibility of user assembly code to preserve FSR2 and restore it before returning to compiled code. You might also need some way of notifying the assembler that the user is managing their own bank switching.

 

 

 

I do hope this isn't a totally daft idea as it *MIGHT* be a half way house, potentially leading to a compiler that uses the extended instructions without clashing with user assembly code. There's got to be a really *good* reason why you haven't done this . . . but the BoostC_Pic16 compiler manages with one FSR, so it must be sort of possible.

Share this post


Link to post
Share on other sites

I gave up and start using Microchip USB Bootloader. It´s working good with boostc but does not support encryption. It will be easy to add it but then you need to buy Microchip compiler and then there is no need to have SourceBoost compiler :D

Edited by sdujolo

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...