-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Arduino 1.0
avr-gcc (Fedora 4.6.2-1.fc16) 4.6.2
Compiling causes a lot of problems about missing "const" words.
Those are my changes that fix this.
OPTILOADER.H
1)
// Forward decl
extern const image_t PROGMEM image_328, image_328p, image_168, image_8;
OPTILOADER.PDE
1)
void read_image(const image_t *ip);
/*
- Table of defined images
*/
const image_t *images[] = {
&image_328, &image_328p, &image_168, &image_8, 0
};
image_t const target_flashptr; / pointer to target info in flash */
/*
- read_image
* - Read an intel hex image from a string in pgm memory.
- We assume that the image does not exceed the 512 bytes that we have
- allowed for it to have. that would be bad.
- Also read other data from the image, such as fuse and protecttion byte
- values during programming, and for after we're done.
*/
void read_image (const image_t *ip)
{
uint16_t len, totlen=0, addr;
const char *hextext = &ip->image_hexcode[0];
target_startaddr = 0;
/*
- target_findimage
* - given target_type loaded with the relevant part of the device signature,
- search the hex images that we have programmed in flash, looking for one
- that matches.
*/
boolean target_findimage ()
{
// tutaj skasowalem linie image_t *ip;
fp("Searching for image...\n");
for (uint8_t i=0; i < sizeof(images)/sizeof(images[0]); i++) {
//target_flashptr = images[i];
const image_t *ip = images[i];
target_flashptr = images[i];
if (ip && (pgm_read_word(&ip->image_chipsig) == target_type)) {
fp(" Found \"");
flashprint(&ip->image_name[0]);
fp("\" for ");
flashprint(&ip->image_chipname[0]);
fp("\n");
read_image(ip);
return true;
}
}
fp(" Not Found\n");
return(false);
}
Thanks,
Arthur.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels