Skip to content

Commit

Permalink
change python format for Bootrom (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
davideschiavone authored Jan 29, 2024
1 parent 507fea3 commit 98a41e1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 37 deletions.
28 changes: 0 additions & 28 deletions hw/ip/boot_rom/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
## boot_rom

1. If you haven't done it yet, install [Conda](https://phoenixnap.com/kb/how-to-install-anaconda-ubuntu-18-04-or-20-04) as described in the link,
and create the Conda enviroment with python 2.7:

```bash
conda update conda
conda env create -f environment.yml
```

Activate the environment with

```bash
conda activate boot_rom
```

If you are already in the core-v-mini-mcu conda env, deactivate it first:

```bash
conda deactivate
```

2. Install the required Python tools:

```
pip install --user -r python-requirements.txt
```

3. Generate the boot_rom:

If you modified the `boot_rom.S` file, generate it as:

```
Expand Down
6 changes: 0 additions & 6 deletions hw/ip/boot_rom/environment.yml

This file was deleted.

5 changes: 2 additions & 3 deletions hw/ip/boot_rom/gen_rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@
def read_bin():

with open(filename + ".img", 'rb') as f:
rom = binascii.hexlify(f.read())
rom = map(''.join, zip(rom[::2], rom[1::2]))

rom = bytes.hex(f.read())
rom = list(map(''.join, zip(rom[::2], rom[1::2])))

# align to 32 bit
align = (int((len(rom) + 3) / 4 )) * 4;
Expand Down

0 comments on commit 98a41e1

Please sign in to comment.