///////////////////////////////////////////////////////////////////////////
//// AppForTiny.H ////
//// For CCS-PICCC (PIC C Compiler) by Matias ////
//// This include file must be included by any application that ////
//// is going to be loaded by Tinybootloader (checked in VER 1.91). ////
//// ////
//// Tinybootloader 1.9 relocate the reset and interrupt automatically////
//// You have only to reserve space for the bootloader. ////
//// ////
//// Probably you'll have problems configuring fuses (especially ////
//// Code Protect). Modify the ASM file of the bootloader with MPLAB ////
///////////////////////////////////////////////////////////////////////////
#define MAX_FLASH 0x8000 //for PICs with 32KB of mem
#define LOADER_SIZE 0xFF //tinybld size + a bit more (200 bytes is enough)
Joined: 03 Oct 2005 Posts: 88 Location: Ploiesti, Romania
Posted: Thu Jun 08, 2006 4:24 am
I have used Tiny Bootloader heavily with 18F452 straight on, without any workarounds in the C code. Just compiled and wrote the resulting hex with the host program. Nothing more. Your solution is indeed useful if the program is large and would overwrite the bootloader, in this case the compiler would issue an error.
As an improvement, you can use the getenv() function to define the flash size automatically for any chip:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum