ra8-firmware
0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
usb_msc_mram_steps.h
Go to the documentation of this file.
1
24
25
#pragma once
26
27
#include <stdint.h>
28
34
typedef
enum : uint32_t {
35
k_demo_thread_stack
= 4096U,
36
k_demo_usbx_pool_bytes
= 32768U,
37
k_demo_block_size
= 512U,
38
k_demo_idle_ticks
= 50U,
39
}
demo_config_t
;
40
45
typedef
enum : uint32_t {
46
k_mram_base_addr
= 0x02000000U,
47
k_mram_bytes
= 0x00100000U,
48
}
demo_mram_t
;
49
61
typedef
enum : uint32_t {
62
k_fat_reserved_sectors
= 1U,
63
k_fat_num_fats
= 1U,
64
k_fat_fat_sectors
= 17U,
65
k_fat_root_entries
= 512U,
66
k_fat_root_sectors
= 32U,
67
k_fat_data_sectors
= 4096U,
68
k_fat_fat_lba
= 1U,
69
k_fat_root_lba
= 18U,
70
k_fat_data_lba
= 50U,
71
k_fat_total_sectors
= 4146U,
72
k_fat_first_cluster
= 2U,
73
k_fat_mram_clusters
= 2048U,
74
k_fat_last_mram_clus
= 2049U,
75
k_fat_entries_per_sec
= 256U,
76
k_fat_eoc
= 0xFFFFU,
77
k_fat_entry0
= 0xFFF8U,
78
}
demo_fat_geom_t
;
79
84
typedef
enum : uint32_t {
85
k_boot_jmp0
= 0xEBU,
86
k_boot_jmp1
= 0x3CU,
87
k_boot_jmp2
= 0x90U,
88
k_boot_media
= 0xF8U,
89
k_boot_sec_per_trk
= 32U,
90
k_boot_num_heads
= 16U,
91
k_boot_drive_num
= 0x80U,
92
k_boot_ext_sig
= 0x29U,
93
k_boot_volume_id
= 0x52A8D200U,
94
k_boot_sig_lo
= 0x55U,
95
k_boot_sig_hi
= 0xAAU,
96
k_boot_sig_lo_off
= 510U,
97
k_boot_sig_hi_off
= 511U,
98
}
demo_fat_boot_t
;
99
104
typedef
enum : uint8_t {
105
k_bpb_off_jmp
= 0U,
106
k_bpb_off_oem
= 3U,
107
k_bpb_off_bps
= 11U,
108
k_bpb_off_spc
= 13U,
109
k_bpb_off_rsvd
= 14U,
110
k_bpb_off_nfats
= 16U,
111
k_bpb_off_rootent
= 17U,
112
k_bpb_off_totsec16
= 19U,
113
k_bpb_off_media
= 21U,
114
k_bpb_off_fatsz16
= 22U,
115
k_bpb_off_spt
= 24U,
116
k_bpb_off_heads
= 26U,
117
k_bpb_off_drvnum
= 36U,
118
k_bpb_off_bootsig
= 38U,
119
k_bpb_off_volid
= 39U,
120
k_bpb_off_label
= 43U,
121
k_bpb_off_fstype
= 54U,
122
k_dir_entry_bytes
= 32U,
123
k_dir_off_attr
= 11U,
124
k_dir_off_cluster_lo
= 26U,
125
k_dir_off_size
= 28U,
126
k_dir_attr_volume
= 0x08U,
127
k_dir_attr_read_only
= 0x01U,
128
k_dir_name_bytes
= 11U,
129
k_byte_shift
= 8U,
130
k_byte_mask
= 0xFFU,
131
}
demo_fat_off_t
;
132
137
typedef
enum : uint32_t {
138
k_word_shift
= 16U,
139
k_word_mask
= 0xFFFFU,
140
}
demo_word_pack_t
;
141
142
#ifndef RA8_OFF_TARGET
143
144
#include "ux_api.h"
145
165
void
demo_fat_fill_sector
(uint32_t lba, UCHAR* out);
166
167
#endif
/* !RA8_OFF_TARGET */
demo_config_t
demo_config_t
Compile-time settings for the HTTPS client demo.
Definition
main.c:87
k_demo_thread_stack
@ k_demo_thread_stack
Demo thread stack.
Definition
main.c:89
k_demo_idle_ticks
@ k_demo_idle_ticks
Idle back-off when no class active.
Definition
main.c:122
k_demo_usbx_pool_bytes
@ k_demo_usbx_pool_bytes
USBX pool: 32 KiB; CDC-ACM enum exhausts 16 KiB.
Definition
main.c:120
k_demo_block_size
@ k_demo_block_size
SCSI logical block size (bytes).
Definition
main.c:123
k_dir_off_attr
@ k_dir_off_attr
MS FAT spec sec 6 "DIR_Attr".
Definition
ra8_fs_fat_types_internal.h:68
k_byte_mask
@ k_byte_mask
Byte mask.
Definition
ra8_fs_fat_types_internal.h:459
k_word_mask
@ k_word_mask
Word mask.
Definition
ra8_fs_fat_types_internal.h:467
k_boot_sig_hi_off
@ k_boot_sig_hi_off
Signature high-byte offset.
Definition
usb_host_msc_browse_steps.c:69
k_boot_jmp0
@ k_boot_jmp0
Short JMP opcode.
Definition
usb_host_msc_browse_steps.c:57
k_boot_num_heads
@ k_boot_num_heads
Geometry filler.
Definition
usb_host_msc_browse_steps.c:62
k_boot_sig_lo_off
@ k_boot_sig_lo_off
Signature low-byte offset.
Definition
usb_host_msc_browse_steps.c:68
k_boot_sig_hi
@ k_boot_sig_hi
Boot signature high byte.
Definition
usb_host_msc_browse_steps.c:67
k_boot_jmp1
@ k_boot_jmp1
JMP displacement.
Definition
usb_host_msc_browse_steps.c:58
k_boot_sig_lo
@ k_boot_sig_lo
Boot signature low byte.
Definition
usb_host_msc_browse_steps.c:66
k_boot_media
@ k_boot_media
Fixed-disk media byte.
Definition
usb_host_msc_browse_steps.c:60
k_boot_sec_per_trk
@ k_boot_sec_per_trk
Geometry filler.
Definition
usb_host_msc_browse_steps.c:61
k_boot_ext_sig
@ k_boot_ext_sig
Extended boot signature.
Definition
usb_host_msc_browse_steps.c:64
k_boot_drive_num
@ k_boot_drive_num
BIOS drive number.
Definition
usb_host_msc_browse_steps.c:63
k_boot_jmp2
@ k_boot_jmp2
NOP.
Definition
usb_host_msc_browse_steps.c:59
k_boot_volume_id
@ k_boot_volume_id
Arbitrary volume serial.
Definition
usb_host_msc_browse_steps.c:65
k_word_shift
@ k_word_shift
Bits per half-word.
Definition
usb_host_msc_browse_steps.c:77
k_fat_root_entries
@ k_fat_root_entries
Root directory entries.
Definition
usb_host_msc_browse_steps.h:85
k_fat_eoc
@ k_fat_eoc
End-of-chain marker.
Definition
usb_host_msc_browse_steps.h:96
k_fat_data_sectors
@ k_fat_data_sectors
Padded data region (>= 4085).
Definition
usb_host_msc_browse_steps.h:87
k_fat_data_lba
@ k_fat_data_lba
First data sector (cluster 2).
Definition
usb_host_msc_browse_steps.h:90
k_fat_root_sectors
@ k_fat_root_sectors
512 entries x 32 B / 512 B.
Definition
usb_host_msc_browse_steps.h:86
k_fat_root_lba
@ k_fat_root_lba
First root-directory sector.
Definition
usb_host_msc_browse_steps.h:89
k_fat_fat_sectors
@ k_fat_fat_sectors
FAT16 size for 4098 entries.
Definition
usb_host_msc_browse_steps.h:84
k_fat_fat_lba
@ k_fat_fat_lba
First FAT sector.
Definition
usb_host_msc_browse_steps.h:88
k_fat_first_cluster
@ k_fat_first_cluster
FAT data area starts at cluster 2.
Definition
usb_host_msc_browse_steps.h:92
k_fat_entry0
@ k_fat_entry0
FAT[0]: media F8 + filler.
Definition
usb_host_msc_browse_steps.h:97
k_fat_reserved_sectors
@ k_fat_reserved_sectors
Boot sector only.
Definition
usb_host_msc_browse_steps.h:82
k_fat_entries_per_sec
@ k_fat_entries_per_sec
FAT16 entries per 512-byte sector.
Definition
usb_host_msc_browse_steps.h:95
k_fat_total_sectors
@ k_fat_total_sectors
1 + 17 + 32 + 4096.
Definition
usb_host_msc_browse_steps.h:91
k_fat_last_mram_clus
@ k_fat_last_mram_clus
Last cluster of MRAM.BIN.
Definition
usb_host_msc_browse_steps.h:94
k_fat_num_fats
@ k_fat_num_fats
Single FAT copy.
Definition
usb_host_msc_browse_steps.h:83
k_fat_mram_clusters
@ k_fat_mram_clusters
Clusters backed by MRAM (1 MiB).
Definition
usb_host_msc_browse_steps.h:93
k_dir_entry_bytes
@ k_dir_entry_bytes
Directory entry size.
Definition
usb_host_msc_browse_steps.h:122
k_bpb_off_spt
@ k_bpb_off_spt
Sectors per track.
Definition
usb_host_msc_browse_steps.h:115
k_bpb_off_label
@ k_bpb_off_label
Volume label (11 bytes).
Definition
usb_host_msc_browse_steps.h:120
k_dir_attr_volume
@ k_dir_attr_volume
Volume-label attribute.
Definition
usb_host_msc_browse_steps.h:126
k_bpb_off_media
@ k_bpb_off_media
Media descriptor.
Definition
usb_host_msc_browse_steps.h:113
k_bpb_off_bps
@ k_bpb_off_bps
Bytes per sector.
Definition
usb_host_msc_browse_steps.h:107
k_dir_off_size
@ k_dir_off_size
File size (32-bit LE).
Definition
usb_host_msc_browse_steps.h:125
k_bpb_off_jmp
@ k_bpb_off_jmp
Jump instruction.
Definition
usb_host_msc_browse_steps.h:105
k_bpb_off_heads
@ k_bpb_off_heads
Head count.
Definition
usb_host_msc_browse_steps.h:116
k_bpb_off_oem
@ k_bpb_off_oem
OEM name (8 bytes).
Definition
usb_host_msc_browse_steps.h:106
k_bpb_off_volid
@ k_bpb_off_volid
Volume serial (4 bytes).
Definition
usb_host_msc_browse_steps.h:119
k_bpb_off_bootsig
@ k_bpb_off_bootsig
Extended boot signature.
Definition
usb_host_msc_browse_steps.h:118
k_bpb_off_fatsz16
@ k_bpb_off_fatsz16
Sectors per FAT.
Definition
usb_host_msc_browse_steps.h:114
k_bpb_off_rsvd
@ k_bpb_off_rsvd
Reserved sector count.
Definition
usb_host_msc_browse_steps.h:109
k_bpb_off_drvnum
@ k_bpb_off_drvnum
Drive number.
Definition
usb_host_msc_browse_steps.h:117
k_bpb_off_fstype
@ k_bpb_off_fstype
Filesystem type (8 bytes).
Definition
usb_host_msc_browse_steps.h:121
k_bpb_off_rootent
@ k_bpb_off_rootent
Root entry count.
Definition
usb_host_msc_browse_steps.h:111
k_dir_name_bytes
@ k_dir_name_bytes
8.3 name field length.
Definition
usb_host_msc_browse_steps.h:128
k_byte_shift
@ k_byte_shift
Bits per byte for LE packing.
Definition
usb_host_msc_browse_steps.h:129
k_dir_off_cluster_lo
@ k_dir_off_cluster_lo
First cluster (low word).
Definition
usb_host_msc_browse_steps.h:124
k_bpb_off_nfats
@ k_bpb_off_nfats
Number of FATs.
Definition
usb_host_msc_browse_steps.h:110
k_bpb_off_spc
@ k_bpb_off_spc
Sectors per cluster.
Definition
usb_host_msc_browse_steps.h:108
k_bpb_off_totsec16
@ k_bpb_off_totsec16
Total sectors (16-bit).
Definition
usb_host_msc_browse_steps.h:112
k_dir_attr_read_only
@ k_dir_attr_read_only
Read-only attribute.
Definition
usb_host_msc_browse_steps.h:127
k_mram_bytes
@ k_mram_bytes
1 MiB window size.
Definition
usb_host_msc_browse_steps.h:70
k_mram_base_addr
@ k_mram_base_addr
MRAM code window base address.
Definition
usb_host_msc_browse_steps.h:69
demo_fat_geom_t
demo_fat_geom_t
Synthesized FAT16 volume geometry (MS FAT spec 1.03).
Definition
usb_msc_mram_steps.h:61
demo_mram_t
demo_mram_t
The MRAM window this volume exposes (RA8D2 HUM memory map).
Definition
usb_msc_mram_steps.h:45
demo_fat_fill_sector
void demo_fat_fill_sector(uint32_t lba, UCHAR *out)
Synthesize one 512-byte sector of the read-only volume.
Definition
usb_msc_mram_steps.c:199
demo_word_pack_t
demo_word_pack_t
32-bit little-endian split constants.
Definition
usb_msc_mram_steps.h:137
demo_fat_boot_t
demo_fat_boot_t
Boot-sector field values (MS FAT spec 1.03 sec 3.1).
Definition
usb_msc_mram_steps.h:84
demo_fat_off_t
demo_fat_off_t
Byte offsets inside the boot sector and directory entries.
Definition
usb_msc_mram_steps.h:104
examples
ek_ra8d2
hw_validated
manual
usb_msc_mram
inc
usb_msc_mram_steps.h
Generated by
1.16.1