| Details | Message |
|---|
Read-Only Author Manish Tank Posted 13-Jun-2007 10:10 GMT Toolset C51 |  Object to HEX file converter Manish Tank hi, i m using an IDE which generates .obj file as final end result.But i want hex file. so is there any converter of object to hex file. please help in this matter. |
|
Read-Only Author o salvatore Posted 13-Jun-2007 10:30 GMT Toolset C51 |  RE: Object to HEX file converter o salvatore yes, bin2hex. but are you sure you have used your linker? |
|
Read-Only Author Manish Tank Posted 13-Jun-2007 11:07 GMT Toolset C51 |  RE: Object to HEX file converter Manish Tank yes i have used my linker but it the limitation of IDE to generate only object file as end result. from where can i download BIN2HEX converter. |
|
Read-Only Author Joost Leeuwesteijn Posted 13-Jun-2007 11:14 GMT Toolset C51 |  RE: Object to HEX file converter Joost Leeuwesteijn from where can i download BIN2HEX converter. http://www.keil.com/support/docs/275.htm |
|
Read-Only Author Joost Leeuwesteijn Posted 13-Jun-2007 10:32 GMT Toolset C51 |  rtfm... Joost Leeuwesteijn http://www.keil.com/support/man/docs/lx51/lx51_intro.htm and http://www.keil.com/support/man/docs/oh51/ -- Joost |
|
Read-Only Author Andy Neil Posted 13-Jun-2007 12:55 GMT Toolset C51 |  Note Andy Neil Note that all references cited so refer refer to the Object file format used by Keil - since you seem to be using a non-Keil tool, it may be using a different Object file format. Be sure to check the applicability to your particular tools! |
|
Read-Only Author Joost Leeuwesteijn Posted 13-Jun-2007 13:01 GMT Toolset C51 |  RE: Note Joost Leeuwesteijn Note that all references cited so refer refer to the Object file format used by Keil - since you seem to be using a non-Keil tool, it may be using a different Object file format. Be sure to check the applicability to your particular tools! I assumed Keil tools, on this Keil forum ;-) |
|
Read-Only Author Andy Neil Posted 13-Jun-2007 13:04 GMT Toolset C51 |  Off-Topic? Andy Neil "I assumed Keil tools, on this Keil forum ;-)" Yes - you'd have thought that would be obvious, wouldn't you? And it says it specifically here: http://www.keil.com/forum/ And yet people continually post questions about non-Keil products! The OP's description of his IDE does not match the behaviour of the Keil tools, so I presume it must be non-Keil? |
|
Read-Only Author Andy Neil Posted 13-Jun-2007 13:05 GMT Toolset None |  RE: Non-Keil Tools Andy Neil "Be sure to check the applicability to your particular tools!" eg, see: http://www.8052.com/forum/read.phtml?id=110413 |
|
Read-Only Author mm tt Posted 2-Jul-2007 17:24 GMT Toolset C51 |  RE: Object to HEX file converter mm tt Hello Manish, Just needed the affirmation from you whether you are familiar with the below mentioned e-mail address or name: >> monnie_20032003@yahoo.com >> sony Really appreciate that. -M |
|
Read-Only Author mann mania Posted 3-Jul-2007 08:20 GMT Toolset C51 |  RE: Object to HEX file converter mann mania to mm tt i m not familiar with this email id. |
|
Read-Only Author Anonymous Coward Posted 3-Jul-2007 08:25 GMT Toolset C51 |  RE: Object to HEX file converter Anonymous Coward What's with the cryptic messages and what does it have to do with this thread? |
|
Read-Only Author almak sreem Posted 3-Jul-2007 14:30 GMT Toolset C51 |  Whats wrong with this code ? almak sreem
void fatcheck(vodi)
{
unsigned char sectors_per_cluster;
unsigned int *pi;
unsigned long *pl;
pi = (unsigned int *)&raw_block[FAT_BYTES_PER_SECTOR];
partition.bytes_per_sector = *pi++;
partition.sectors_per_cluster = *pi & 0xFF;
pi = (unsigned int *)&raw_block[FAT_RESERVED_SECTORS];
reserved_sectors = *pi++;
number_of_fats = *pi & 0xFF;
pl = (unsigned long *)&raw_block[FAT_FAT_SIZE];
sectors_per_fat = *pl;
partition.fat1_start_sector = partition.offset + reserved_sectors;
partition.fat2_start_sector = partition.fat1_start_sector + sectors_per_fat;
partition.root_dir_start_sector = partition.fat2_start_sector + sectors_per_fat;
partition.last_free_chain = 0;
fat_find_free_chain();}
static unsigned long fat_calc_data_address(unsigned long cluster, unsigned char sector)
{unsigned long offset;
offset = ((cluster - 2) * partition.sectors_per_cluster);
offset += partition.root_dir_start_sector;
offset += sector;
offset *= partition.bytes_per_sector;
return offset;}
static unsigned long fat_calc_chain_address(unsigned long index)
{unsigned long offset;
offset = partition.fat1_start_sector + (index >> 7);
offset *= partition.bytes_per_sector;
return offset;}
void fat_load_root_directory(void)
{unsigned long offset;
offset = partition.root_dir_start_sector;
offset *= partition.bytes_per_sector;
mmc_read(offset);
directory.parent_cluster = 0x00;
directory.start_cluster = 0x02;
directory.current_sector = 0x00;
directory.current_cluster = 0x02;
directory.current_direntry = (DIRENTRY *)FIRST_ENTRY_IN_ROOT;}
static void fat_load_directory(unsigned long cluster, unsigned char sector, unsigned char new)
{mmc_read(fat_calc_data_address(cluster, sector));
if (new)
{directory.parent_cluster = directory.start_cluster;
directory.start_cluster = cluster;
directory.current_direntry = (DIRENTRY *)FIRST_ENTRY_IN_DIR;}
directory.current_cluster = cluster;
directory.current_sector = sector;}
static void fat_read_next_sector_or_cluster(void)
{if (directory.current_sector == (partition.sectors_per_cluster-1))
fat_load_directory(fat_next_chain(directory.current_cluster), 0, FALSE);
else
{directory.current_sector++;
fat_load_directory(directory.current_cluster, directory.current_sector, FALSE);}}
static DIRENTRY *fat_seek_directory(char *name, unsigned char find_free)
{unsigned char i;
DIRENTRY *p = (DIRENTRY *)START_OF_SECTOR;
fat_load_directory(directory.start_cluster, 0, FALSE);
i = 0;
while(1)
{i++;
if (match_name(name, p->Name, 8))
if (p->Attribute & ATTRIB_SUBDIR)
{if (!find_free) return p;
else return 0;}
if (!p->Name[0])
{if (!find_free)
return 0;
else
return p;}
p++;
if (!(i % 0x10))
{i = 0;
p = (DIRENTRY *)START_OF_SECTOR;
fat_read_next_sector_or_cluster();}}
return 0;}
static DIRENTRY *fat_seek_file(char *name, unsigned char find_free)
{unsigned char i;
DIRENTRY *p = (DIRENTRY *)START_OF_SECTOR;
fat_load_directory(directory.start_cluster, 0, FALSE);
i = 0;
while(1)
{i++;
if (match_name(name, p->Name, 11))
if (p->Attribute == ATTRIB_ARCHIVE)
return p;
if (!p->Name[0])
{if (!find_free) return 0;
else return p;}
p++;
if (!(i % 0x10))
{i = 0;
p = (DIRENTRY *)START_OF_SECTOR;
fat_read_next_sector_or_cluster();}}
return 0;}
static unsigned long fat_find_free_chain(void)
{unsigned long index = partition.last_free_chain;
unsigned long *p;
mmc_read(fat_calc_chain_address(index));
p = (unsigned long* )START_OF_SECTOR;
p += (index & 0x7F);
while(*p)
{index++;
p++;
if (!(index % 0x80))
{mmc_read(fat_calc_chain_address(index));
p = (unsigned long* )START_OF_SECTOR;}}
partition.last_free_chain = index;
return index;}
unsigned char fat_read_direntry(unsigned char first)
{if (first)
fat_load_directory(directory.start_cluster, 0, FALSE);
else
{if (directory.current_direntry == (DIRENTRY *)LAST_DIRENTRY)
{fat_read_next_sector_or_cluster();
directory.current_direntry = (DIRENTRY *)START_OF_SECTOR;}
else
directory.current_direntry += 0x20; }}
static unsigned long fat_next_chain(unsigned long from)
{unsigned long *p;
mmc_read(fat_calc_chain_address(from));
p = (unsigned long* )START_OF_SECTOR;
p += (from & 0x7F);
return *p;}
void fat_mark_next_chain(unsigned long old, unsigned long new)
{unsigned long *p;
unsigned long offset;
offset = fat_calc_chain_address(old);
mmc_read(offset);
p = (unsigned long* )START_OF_SECTOR;
p += (old & 0x7F);
*p = new;
mmc_write(offset);
offset = fat_calc_chain_address(new);
mmc_read(offset);
p = (unsigned long* )START_OF_SECTOR;
p += (new & 0x7F);
*p = 0x0FFFFFFF;
mmc_write(offset);}
void fat_chain_free(unsigned long index)
{unsigned long *p;
unsigned long temp = index;
unsigned long offset;
while (temp)
{offset = fat_calc_chain_address(temp);
mmc_read(offset);
p = (unsigned long* )START_OF_SECTOR;
p += (temp & 0x7F);
temp = *p;
*p = 0;
mmc_write(offset); }}
static void fat_clear_sector(unsigned long cluster, unsigned char sector)
{mmc_clear(fat_calc_data_address(cluster, sector));}
unsigned char fat_make_directory(char *name)
}
|
|
Read-Only Author Anonymous Coward Posted 3-Jul-2007 14:33 GMT Toolset C51 |  RE: Whats wrong with this code ? Anonymous Coward Why put this in this thread and not keep it here http://www.keil.com/forum/docs/thread10155.asp ??? And it looks -very- messy. |
|
Read-Only Author erik malund Posted 3-Jul-2007 15:12 GMT Toolset C51 |  RE: Whats wrong with this code ? erik malund Whats wrong with this code ? 1) it is not indented 2) it is not commented 3) it is in the wrong thread 4) naah - the above will suffice Erik |
|