OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [exec/] [cmd/] [cmd_loadsrec.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 sergeykhbr
/**
2
 * @file
3
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
4
 * @brief      SREC-file loader command.
5
 */
6
 
7
#ifndef __DEBUGGER_CMD_LOADSREC_H__
8
#define __DEBUGGER_CMD_LOADSREC_H__
9
 
10
#include "api_core.h"
11
#include "coreservices/itap.h"
12
#include "coreservices/isocinfo.h"
13
#include "coreservices/icommand.h"
14
 
15
namespace debugger {
16
 
17
class CmdLoadSrec : public ICommand  {
18
public:
19
    explicit CmdLoadSrec(ITap *tap, ISocInfo *info);
20
 
21
    /** ICommand interface */
22
    virtual bool isValid(AttributeType *args);
23
    virtual void exec(AttributeType *args, AttributeType *res);
24
 
25
private:
26
    uint8_t str2byte(uint8_t *pair);
27
    bool check_crc(uint8_t *str, int sz);
28
    int check_header(uint8_t *img);
29
    int readline(uint8_t *img, int off,
30
                 uint64_t &addr, int &sz, uint8_t *out);
31
 
32
private:
33
    char header_data_[1024];
34
};
35
 
36
}  // namespace debugger
37
 
38
#endif  // __DEBUGGER_CMD_LOADSREC_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.