URL
https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk
Subversion Repositories adv_debug_sys
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 56 to Rev 57
- ↔ Reverse comparison
Rev 56 → Rev 57
/adv_debug_sys/trunk/Software/adv_jtag_bridge/bsdl_parse.c
103,9 → 103,11
// Parse an entity line |
token = strtok_r(NULL, " \t", &last); |
if(token != NULL) { |
entityname = (char *) malloc(strlen(token)); |
if(entityname != NULL) strcpy(entityname, token); |
debug("Found entity \'%s\'\n", entityname); |
entityname = strdup(token); |
if(entityname != NULL) |
{ |
debug("Found entity \'%s\'\n", entityname); |
} |
} else { |
printf("Parse error near ENTITY token in file %s\n", bsdlfilename); |
} |
231,6 → 233,8
// and we can't just scan for ';' to find out because there's a '\0' at the end of this line. |
// But, it can't be bigger than the entire rest of the file, so... |
cmdbuf = (char *) malloc(filesize-filepos); |
debug("Malloc'd %i bytes for INSTRUCTION_OPCODE\n", filesize-filepos); |
|
// Parse until ';', and grab everything between each pair of "" found |
// Note that 'last' still points at "is" |
j = 0; |
253,6 → 257,7
} |
} |
cmdbuf[j] = '\0'; |
debug("Finished copying INSTRUCTION_OPCODE, copied %i bytes", j+1); |
|
// Parse the opcodes attribute. This is an exercise unto itself, so do it in another function. |
parse_opcodes(cmdbuf, &debug_cmd, &user1_cmd, &idcode_cmd); |
/adv_debug_sys/trunk/Software/adv_jtag_bridge/adv_jtag_bridge.c
343,7 → 343,7
case 'l': |
get_ir_opts(optarg, &idx, &val); // parse the option |
if(num_ir_sets >= (IR_START_SETS<<reallocs)) { |
cmd_line_ir_sizes = (irset *) realloc(cmd_line_ir_sizes, (IR_START_SETS<<reallocs)*sizeof(irset)); |
cmd_line_ir_sizes = (irset *) realloc(cmd_line_ir_sizes, (IR_START_SETS<<(++reallocs))*sizeof(irset)); |
if(cmd_line_ir_sizes == NULL) { |
printf("Error: out of memory while parsing command line. Aborting.\n"); |
exit(1); |
/adv_debug_sys/trunk/Software/adv_jtag_bridge/or32_selftest.c
408,7 → 408,7
printf("Testing CPU0 (or1k) - writing instructions\n"); |
CHECK(dbg_wb_write32(SDRAM_BASE+0x00, 0xe0000005)); /* l.xor r0,r0,r0 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x04, 0x9c200000)); /* l.addi r1,r0,0x0 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x08, 0x18400000)); /* l.movhi r2,0x4000 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x08, 0x18400000)); /* l.movhi r2,0x0000 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x0c, 0xa8420030)); /* l.ori r2,r2,0x30 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x10, 0x9c210001)); /* l.addi r1,r1,1 */ |
CHECK(dbg_wb_write32(SDRAM_BASE+0x14, 0x9c210001)); /* l.addi r1,r1,1 */ |
/adv_debug_sys/trunk/Software/adv_jtag_bridge/bsdl.c
217,8 → 217,8
if(direntry == NULL) // We need a new directory |
continue; |
|
// Make sure we can hold the full path |
if((strlen(direntry->d_name) + strlen(bsdl_dirs[bsdl_current_dir+1])+1) >= bsdl_scratchpad_size) |
// Make sure we can hold the full path (+2 for a '/' and the trailing NULL) |
if((strlen(direntry->d_name) + strlen(bsdl_dirs[bsdl_current_dir+1])+2) >= bsdl_scratchpad_size) |
{ |
char *tmp = (char *) realloc(bsdl_scratchpad, (bsdl_scratchpad_size*2)); |
if(tmp != NULL) |