emacs is awesome.
replace-regexp RET [ ]+$ RET RET
and it's done
#define jtag_data_write24(target,instr,data_read) jtag_data_write(target,instr,24,data_read)
#define jtag_data_write32(target,instr,data_read) jtag_data_write(target,instr,32,data_read)
#define jtag_data_write24(target,instr,data_read) jtag_data_write(target,instr,24,data_read)
#define jtag_data_write32(target,instr,data_read) jtag_data_write(target,instr,32,data_read)
* Executes EOnCE instruction.
* Executes EOnCE instruction.
* @param instr Instruction to execute.
* @param instr Instruction to execute.
- * @param rw
- * @param go
- * @param ex
+ * @param rw
+ * @param go
+ * @param ex
* @param eonce_status Value read from the EOnCE status register.
* @param eonce_status Value read from the EOnCE status register.
*/
static int eonce_instruction_exec_single(struct target * target, uint8_t instr, uint8_t rw, uint8_t go, uint8_t ex,uint8_t * eonce_status){
int retval;
*/
static int eonce_instruction_exec_single(struct target * target, uint8_t instr, uint8_t rw, uint8_t go, uint8_t ex,uint8_t * eonce_status){
int retval;
* Takes the core out of debug mode.
* Takes the core out of debug mode.
* @param eonce_status Data read from the EOnCE status register.
* @param eonce_status Data read from the EOnCE status register.
*/
static int eonce_exit_debug_mode(struct target * target,uint8_t * eonce_status){
int retval;
*/
static int eonce_exit_debug_mode(struct target * target,uint8_t * eonce_status){
int retval;
}
#define TIME_DIV_FREESCALE 0.3
}
#define TIME_DIV_FREESCALE 0.3
* Puts the core into debug mode, enabling the EOnCE module.
* Puts the core into debug mode, enabling the EOnCE module.
* @param eonce_status Data read from the EOnCE status register.
* @param eonce_status Data read from the EOnCE status register.
*/
static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_status){
int retval = ERROR_OK;
*/
static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_status){
int retval = ERROR_OK;
* Puts the core into debug mode, enabling the EOnCE module.
* This will not always work, eonce_enter_debug_mode executes much
* more complicated routine, which is guaranteed to work, but requires
* Puts the core into debug mode, enabling the EOnCE module.
* This will not always work, eonce_enter_debug_mode executes much
* more complicated routine, which is guaranteed to work, but requires
* after a reset clock divisors must be set again.
* This implementation works most of the time, and is not accesible to the
* user.
* after a reset clock divisors must be set again.
* This implementation works most of the time, and is not accesible to the
* user.
* @param eonce_status Data read from the EOnCE status register.
* @param eonce_status Data read from the EOnCE status register.
*/
static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t * eonce_status){
int retval;
*/
static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t * eonce_status){
int retval;
* Reads the current value of the program counter and stores it.
* Reads the current value of the program counter and stores it.
- *
- * @param target
- *
- * @return
+ *
+ * @param target
+ *
+ * @return
*/
static int eonce_pc_store(struct target * target){
uint8_t tmp[2];
*/
static int eonce_pc_store(struct target * target){
uint8_t tmp[2];
* The value of @address determines if it corresponds to P: (program) or X: (data) memory. If the address is over 0x200000 then it is considered X: memory, and @pmem = 0.
* The special case of 0xFFXXXX is not modified, since it allows to read out the memory mapped EOnCE registers.
* The value of @address determines if it corresponds to P: (program) or X: (data) memory. If the address is over 0x200000 then it is considered X: memory, and @pmem = 0.
* The special case of 0xFFXXXX is not modified, since it allows to read out the memory mapped EOnCE registers.
- *
- * @param address
- * @param pmem
- *
- * @return
+ *
+ * @param address
+ * @param pmem
+ *
+ * @return
*/
static int dsp5680xx_convert_address(uint32_t * address, int * pmem){
// Distinguish data memory (x:) from program memory (p:) by the address.
*/
static int dsp5680xx_convert_address(uint32_t * address, int * pmem){
// Distinguish data memory (x:) from program memory (p:) by the address.
* Writes @buffer to memory.
* The parameter @address determines whether @buffer should be written to P: (program) memory or X: (data) memory.
* Writes @buffer to memory.
* The parameter @address determines whether @buffer should be written to P: (program) memory or X: (data) memory.
* @param address
* @param size Bytes (1), Half words (2), Words (4).
* @param count In bytes.
* @param address
* @param size Bytes (1), Half words (2), Words (4).
* @param count In bytes.
- * @param buffer
- *
- * @return
+ * @param buffer
+ *
+ * @return
*/
static int dsp5680xx_write(struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t * buffer){
//TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012
*/
static int dsp5680xx_write(struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t * buffer){
//TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012
return dsp5680xx_write(target, address, 1, size, buffer);
}
return dsp5680xx_write(target, address, 1, size, buffer);
}
* This function is called by verify_image, it is used to read data from memory.
* This function is called by verify_image, it is used to read data from memory.
* @param address Word addressing.
* @param size In bytes.
* @param address Word addressing.
* @param size In bytes.
- * @param buffer
- *
- * @return
+ * @param buffer
+ *
+ * @return
*/
static int dsp5680xx_read_buffer(struct target * target, uint32_t address, uint32_t size, uint8_t * buffer){
if(target->state != TARGET_HALTED){
*/
static int dsp5680xx_read_buffer(struct target * target, uint32_t address, uint32_t size, uint8_t * buffer){
if(target->state != TARGET_HALTED){
return dsp5680xx_read(target,address,2,size/2,buffer);
}
return dsp5680xx_read(target,address,2,size/2,buffer);
}
* This function is not implemented.
* It returns an error in order to get OpenOCD to do read out the data and calculate the CRC, or try a binary comparison.
* This function is not implemented.
* It returns an error in order to get OpenOCD to do read out the data and calculate the CRC, or try a binary comparison.
* @param address Start address of the image.
* @param size In bytes.
* @param address Start address of the image.
* @param size In bytes.
- * @param checksum
- *
- * @return
+ * @param checksum
+ *
+ * @return
*/
static int dsp5680xx_checksum_memory(struct target * target, uint32_t address, uint32_t size, uint32_t * checksum){
return ERROR_FAIL;
}
*/
static int dsp5680xx_checksum_memory(struct target * target, uint32_t address, uint32_t size, uint32_t * checksum){
return ERROR_FAIL;
}
* Calculates a signature over @word_count words in the data from @buff16. The algorithm used is the same the FM uses, so the @return may be used to compare with the one generated by the FM module, and check if flashing was successful.
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
* Calculates a signature over @word_count words in the data from @buff16. The algorithm used is the same the FM uses, so the @return may be used to compare with the one generated by the FM module, and check if flashing was successful.
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
- *
- * @param buff16
- * @param word_count
- *
- * @return
+ *
+ * @param buff16
+ * @param word_count
+ *
+ * @return
*/
static int perl_crc(uint8_t * buff8,uint32_t word_count){
uint16_t checksum = 0xffff;
*/
static int perl_crc(uint8_t * buff8,uint32_t word_count){
uint16_t checksum = 0xffff;
* Resets the SIM. (System Integration Module).
* Resets the SIM. (System Integration Module).
- *
- * @param target
- *
- * @return
+ *
+ * @param target
+ *
+ * @return
*/
int dsp5680xx_f_SIM_reset(struct target * target){
int retval = ERROR_OK;
*/
int dsp5680xx_f_SIM_reset(struct target * target){
int retval = ERROR_OK;
* Halts the core and resets the SIM. (System Integration Module).
* Halts the core and resets the SIM. (System Integration Module).
- *
- * @param target
- *
- * @return
+ *
+ * @param target
+ *
+ * @return
*/
static int dsp5680xx_soft_reset_halt(struct target *target){
//TODO is this what this function is expected to do...?
*/
static int dsp5680xx_soft_reset_halt(struct target *target){
//TODO is this what this function is expected to do...?
* Executes a command on the FM module. Some commands use the parameters @address and @data, others ignore them.
* Executes a command on the FM module. Some commands use the parameters @address and @data, others ignore them.
* @param command Command to execute.
* @param address Command parameter.
* @param data Command parameter.
* @param hfm_ustat FM status register.
* @param pmem Address is P: (program) memory (@pmem==1) or X: (data) memory (@pmem==0)
* @param command Command to execute.
* @param address Command parameter.
* @param data Command parameter.
* @param hfm_ustat FM status register.
* @param pmem Address is P: (program) memory (@pmem==1) or X: (data) memory (@pmem==0)
*/
static int dsp5680xx_f_execute_command(struct target * target, uint16_t command, uint32_t address, uint32_t data, uint16_t * hfm_ustat, int pmem){
int retval;
*/
static int dsp5680xx_f_execute_command(struct target * target, uint16_t command, uint32_t address, uint32_t data, uint16_t * hfm_ustat, int pmem){
int retval;
-/**
- * Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.)
- *
- * @param target
- *
- * @return
+/**
+ * Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.)
+ *
+ * @param target
+ *
+ * @return
*/
static int set_fm_ck_div(struct target * target){
uint8_t i[2];
*/
static int set_fm_ck_div(struct target * target){
uint8_t i[2];
* Executes the FM calculate signature command. The FM will calculate over the data from @address to @address + @words -1. The result is written to a register, then read out by this function and returned in @signature. The value @signature may be compared to the the one returned by perl_crc to verify the flash was written correctly.
* Executes the FM calculate signature command. The FM will calculate over the data from @address to @address + @words -1. The result is written to a register, then read out by this function and returned in @signature. The value @signature may be compared to the the one returned by perl_crc to verify the flash was written correctly.
* @param address Start of flash array where the signature should be calculated.
* @param words Number of words over which the signature should be calculated.
* @param signature Value calculated by the FM.
* @param address Start of flash array where the signature should be calculated.
* @param words Number of words over which the signature should be calculated.
* @param signature Value calculated by the FM.
*/
static int dsp5680xx_f_signature(struct target * target, uint32_t address, uint32_t words, uint16_t * signature){
int retval;
*/
static int dsp5680xx_f_signature(struct target * target, uint32_t address, uint32_t words, uint16_t * signature){
int retval;
* Executes the FM page erase command.
* Executes the FM page erase command.
* @param sector Page to erase.
* @param hfm_ustat FM module status register.
* @param sector Page to erase.
* @param hfm_ustat FM module status register.
*/
static int erase_sector(struct target * target, int sector, uint16_t * hfm_ustat){
int retval;
*/
static int erase_sector(struct target * target, int sector, uint16_t * hfm_ustat){
int retval;
* Executes the FM mass erase command. Erases the flash array completely.
* Executes the FM mass erase command. Erases the flash array completely.
* @param hfm_ustat FM module status register.
* @param hfm_ustat FM module status register.
*/
static int mass_erase(struct target * target, uint16_t * hfm_ustat){
int retval;
*/
static int mass_erase(struct target * target, uint16_t * hfm_ustat){
int retval;
if(retval == ERROR_OK){
LOG_WARNING("Memory was not locked.");
}
if(retval == ERROR_OK){
LOG_WARNING("Memory was not locked.");
}
jtag_add_reset(0,1);
usleep(TIME_DIV_FREESCALE*200*1000);
jtag_add_reset(0,1);
usleep(TIME_DIV_FREESCALE*200*1000);
retval = reset_jtag();
err_check(retval,"Failed to reset JTAG state machine");
usleep(150);
retval = reset_jtag();
err_check(retval,"Failed to reset JTAG state machine");
usleep(150);
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)