Skip to content

Commit

Permalink
fixup : fix comment style
Browse files Browse the repository at this point in the history
  • Loading branch information
mean committed Feb 18, 2024
1 parent 022a638 commit f0d6406
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
28 changes: 14 additions & 14 deletions src/target/riscv32.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,34 +671,34 @@ static int riscv32_breakwatch_clear(target_s *const target, breakwatch_s *const
}

/*
Small helper function to translate target to hart and simplify parameters
We assume it is 32 bits
*/
* Small helper function to translate target to hart and simplify parameters
* We assume it is 32 bits
*/
static inline bool riscv32_target_csr_write(target_s *target, const uint16_t reg, uint32_t val)
{
riscv_hart_s *const hart = riscv_hart_struct(target);
return riscv_csr_write(hart, reg, &val);
}

/*
Small helper function to translate target to hart and simplify parameters
We assume it is 32 bits
*/
* Small helper function to translate target to hart and simplify parameters
* We assume it is 32 bits
*/
static inline bool riscv32_target_csr_read(target_s *target, const uint16_t reg, uint32_t *val)
{
riscv_hart_s *const hart = riscv_hart_struct(target);
return riscv_csr_read(hart, reg, val);
}

/*
Execute code on the target with the signature void function(a,b,c,d)
- codexec is the address the code to tun is located at
- param1/2/3/4 will end up as the 4 parameters of the stub function
The flashstub must not use the stack at all.
It returns true on success, false on error
There is a built-in timeout of 10 seconds
*/
* Execute code on the target with the signature void function(a,b,c,d)
* - codexec is the address the code to tun is located at
* - param1/2/3/4 will end up as the 4 parameters of the stub function
*
* The flashstub must not use the stack at all.
* It returns true on success, false on error
* There is a built-in timeout of 10 seconds
*/
bool riscv32_run_stub(
target_s *target, uint32_t loadaddr, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4)
{
Expand Down
16 changes: 8 additions & 8 deletions src/target/riscv_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ void riscv32_mem_read(target_s *target, void *dest, target_addr_t src, size_t le
void riscv32_mem_write(target_s *target, target_addr_t dest, const void *src, size_t len);

/*
Execute code on the target with the signature void stub_function(a,b,c,d)
- codexec is the address the code to run is located at
- param1/2/3/4 will end up as the 4 parameters of the stub function
The flashstub must not use the stack at all.
The flashstub must return 0 on success, not 0 on error
There is a built-in timeout of 10 seconds
*/
* Execute code on the target with the signature void stub_function(a,b,c,d)
* - codexec is the address the code to run is located at
* - param1/2/3/4 will end up as the 4 parameters of the stub function
*
* The flashstub must not use the stack at all.
* The flashstub must return 0 on success, not 0 on error
* There is a built-in timeout of 10 seconds
*/
bool riscv32_run_stub(target_s *target, uint32_t loadaddr, uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3);

#endif /*TARGET_RISCV_DEBUG_H*/

0 comments on commit f0d6406

Please sign in to comment.