Jump to content

erkle_01au

EstablishedMember
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About erkle_01au

  • Rank
    Newbrie
  1. I can't find any code to download. What am I missing ?? Peter
  2. No it doesn't set hard protection. The downloader prog checks code size before download. It was definitely a PCLATH handling thing in the boot vector. I rewrote the bootloader to fix it. Peter
  3. Yes. I rewrote both the bootloader code for the PIC16F88(bloader) and the VB downloader prog(screamer). The up side is that it works very well right up to the max code size. The down side is that I couldn't get the bootloader code to fit in 256 words, its about 300. I will live with this rather than fire up the assembler. Peter It does sound like the right thing todo is fix the bootloader. Regards Dave <{POST_SNAPBACK}> Yes, I think so. Should be an interesting journey for me. Peter <{POST_SNAPBACK}> Hi Peter, Any progress on fixing this problem with the bootloader as it's something I am experiencing too? Cheers, cliveski <{POST_SNAPBACK}>
  4. I'm using 6.70. Function pointers work but I am struggling to get an array of function pointers to work. Is it possible ? and if it is, how come this doesn't work. //this should declare an array of 10 function pointers int (*funcArray[10])(char, char); Thanks Peter
  5. I was having all sorts of trouble writing to the flash. Then I read this thread(I hope i've pasted this link in right) and followed the workaround http://forum.sourceboost.com/index.php?sho...8699entry8699 After doing this the problems seemed to go away. Now of course I was only changing one thing at a time so I am not exactly sure what fixed it. Never the less I would still like to be able to write inline asm that is under my full control. I haven't worked out how to use MPLAB to write asm obj modules to link with boostc. Peter
  6. Would it be possible to get a switch on the linker/compiler that allows "untouched" inline assembly. e.g inline asm where the linker does not insert bank select instructions. The well documented case of where this would be useful is writing to flash. In the example the bank select between the MOVLW 0x55 and the MOVWF gbl_eecon2 violates the rules and so it would be useful to use "untouched" inline asm for this. 0E27 008C MOVWF gbl_eedata 0E28 3055 MOVLW 0x55 0E29 1683 BSF STATUS, RP0 0E2A 008D MOVWF gbl_eecon2 0E2B 30AA MOVLW 0xAA 0E2C 008D MOVWF gbl_eecon2 0E2D 148C BSF gbl_eecon1,1 0E2E 0000 NOP 0E2F 0000 NOP I realise that there is some risk involved with this hence the use of a switch but if I'm going to write inline asm I should be allowed to shoot myself in the foot if I want Peter
  7. It does sound like the right thing todo is fix the bootloader. Regards Dave <{POST_SNAPBACK}> Yes, I think so. Should be an interesting journey for me. Peter
  8. No there is no way to control where the start code goes. Its the last code that has its program memory resolved so it will be high in ROM. Maybe if you explain a little more about what you are doing we can thing of another way of making it work. Regards Dave <{POST_SNAPBACK}> I have 6 pic16f88's (1 master and 5 slaves) communicating via HW SPI. After much looking and messing about I finally got the bloader/screamer bootloader combination to work. It works very well and is very fast and allows easy selection between pics for download. The problem occurs when I go over 2k apps code. This code does not work with the bootloader. The PC loader program barfs at the BSF PCLATH,3 ;///////////////////////////////////////////////////////////////////////////////// ;// Code Generator: BoostC Compiler - http://www.sourceboost.com ;// Version : 6.60 ;// License Type : Standard License ;// Limitations : PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only ;///////////////////////////////////////////////////////////////////////////////// ORG 0x00000000 0000 158A BSF PCLATH,3 0001 2957 GOTO _startup ORG 0x00000004 0004 00FF MOVWF Int1Context 0005 0E03 SWAPF STATUS, W 0006 1283 BCF STATUS, RP0 0007 1303 BCF STATUS, RP1 0008 00E0 MOVWF Int1BContext 0009 0E0A SWAPF PCLATH, W 000A 00E1 MOVWF Int1BContext+D'1' 000B 0E04 SWAPF FSR, W 000C 00E2 MOVWF Int1BContext+D'2' 000D 158A BSF PCLATH,3 000E 120A BCF PCLATH,4 000F 2963 GOTO interrupt ORG 0x00000010 This code does work with the bootloader ;///////////////////////////////////////////////////////////////////////////////// ;// Code Generator: BoostC Compiler - http://www.sourceboost.com ;// Version : 6.60 ;// License Type : Standard License ;// Limitations : PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only ;///////////////////////////////////////////////////////////////////////////////// ORG 0x00000000 0000 2FFA GOTO _startup ORG 0x00000004 0004 00FF MOVWF Int1Context 0005 0E03 SWAPF STATUS, W 0006 1283 BCF STATUS, RP0 0007 1303 BCF STATUS, RP1 0008 00E0 MOVWF Int1BContext 0009 0E0A SWAPF PCLATH, W 000A 00E1 MOVWF Int1BContext+D'1' 000B 0E04 SWAPF FSR, W 000C 00E2 MOVWF Int1BContext+D'2' 000D 158A BSF PCLATH,3 000E 120A BCF PCLATH,4 000F 2806 GOTO interrupt ORG 0x00000010 I am looking at modifying the bootloader to handle this but I am struggling with the finer points of PCLATH, PCL, page selecting etc. Peter
  9. I have been playing with bootloaders for the PIC16F88. All seems to work fine until my apps code goes over 2k. This seems to put the _startup module in page 3(well I think it's page 3) and the hex file contains a PCLATH instruction as well as the GOTO _startup. My question is:- is there any way that I can force the _startup module to be in page 1 always so as to ensure the first 4 locations of the hex file only contain a GOTO to the _startup module ??? Peter
×
×
  • Create New...