Check-in [84d0c6cb3e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add opcode for READ and improve range check.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84d0c6cb3e7de31cbedd0db81541b7f57e15f142
User & Date: rmax 2017-06-19 11:27:54.849
Context
2017-08-02
16:42
Applying the address operator to a returned value is not allowed anymore in gcc7, so we have to use a temporary variable. check-in: da0f0efff9 user: rmax tags: trunk
2017-06-19
11:27
Add opcode for READ and improve range check. check-in: 84d0c6cb3e user: rmax tags: trunk
2017-02-20
17:19
Strip and optimize for minimal size check-in: c5cac5fa4a user: rmax tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jq6500.c.
27
28
29
30
31
32
33

34
35
36
37
38
39
40

#define FLASHSIZE 0x200000 /* 2MiB   */
#define BASE       0x40000 /* 256kiB */
#define MAXSIZE (FLASHSIZE - BASE)

#define ERASE 0xfbd8
#define WRITE 0xfbd9

#define BLKSZ 0x1000
#define TIMEOUT 30000

struct jqcmd {
    uint16_t j_cmd;
    uint32_t j_off;
    uint32_t j_foo;







>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

#define FLASHSIZE 0x200000 /* 2MiB   */
#define BASE       0x40000 /* 256kiB */
#define MAXSIZE (FLASHSIZE - BASE)

#define ERASE 0xfbd8
#define WRITE 0xfbd9
#define READ  0xfd03
#define BLKSZ 0x1000
#define TIMEOUT 30000

struct jqcmd {
    uint16_t j_cmd;
    uint32_t j_off;
    uint32_t j_foo;
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
	case 'h':
	default:
	    usage();
	}
    }

    if (!force) {
	if (offset < 0) {
	    errx(1, "Offset out of range [0..0x2000].");
	}
	if (offset % BLKSZ != 0) {
	    errx(1, "Offset must be a multiple of %d.", BLKSZ);
	}
    }

    if (optind == argc) {







|
|







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
	case 'h':
	default:
	    usage();
	}
    }

    if (!force) {
	if (offset < 0 || offset >= FLASHSIZE) {
	    errx(1, "Offset out of range [0..0x%x].", FLASHSIZE);
	}
	if (offset % BLKSZ != 0) {
	    errx(1, "Offset must be a multiple of %d.", BLKSZ);
	}
    }

    if (optind == argc) {