Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Feb 17, 2021

Tock has had a long standing convention of two makefile targets for boards to load a kernel onto a board.

  1. flash: Uses JTAG to flash the kernel.
  2. program: Uses UART and a bootloader to flash the kernel.

This is helpful because some boards support both but require different hardware, and it gives the user some idea of what tools will be needed to load the kernel.

However, new users must figure out which is appropriate if a board supports both. Often there is one target that experienced users just know to use, and we should make this more clear to new users. Also, having different targets on different boards complicates writing a common tutorial guide for multiple platforms.

This patch adds a new target make install that just uses the default for the platform. The expectation is that most users can install the kernel using make install. The other targets are of course there for users who need something more specific.

Testing Strategy

This pull request was tested by using make install to flash the kernel on hail.

TODO or Help Wanted

Thoughts?

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Tock has had a long standing convention of two makefile targets for
boards to load a kernel onto a board.

- flash: Uses JTAG to flash the kernel.
- program: Uses UART and a bootloader to flash the kernel.

This is helpful because some boards support both but require different
hardware, and it gives the user some idea of what tools will be needed
to load the kernel.

However, for new users they must figure out which is appropriate if a
board supports both. Often there is one target that experienced users
just know to use, and we should make this more clear to new users. Also,
having different targets on diferent boards complicates writing a common
tutorial guide for multiple platforms.

This patch adds a new target `make install` that just uses the default
for the platform. The expectation is that most users can install the
kernel using `make install`. The other targets are of course there for
users who need something more specific.
@github-actions github-actions bot added the WG-OpenTitan In the purview of the OpenTitan working group. label Feb 17, 2021
Copy link
Contributor

@hudson-ayers hudson-ayers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change

@bradjc bradjc added the rfc Issue designed for discussion and to solicit feedback. label Feb 17, 2021
alistair23
alistair23 previously approved these changes Feb 18, 2021
@ppannuto ppannuto added the last-call Final review period for a pull request. label Mar 3, 2021
@ppannuto
Copy link
Member

ppannuto commented Mar 5, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 5, 2021

@bors bors bot merged commit 0e31099 into master Mar 5, 2021
@bors bors bot deleted the makefile-install branch March 5, 2021 21:55
lschuermann pushed a commit to lschuermann/tock that referenced this pull request Mar 20, 2021
2440: RFC: Add `install` make target for boards r=ppannuto a=bradjc

Tock has had a long standing convention of two makefile targets for boards to load a kernel onto a board.

1. flash: Uses JTAG to flash the kernel.
1. program: Uses UART and a bootloader to flash the kernel.

This is helpful because some boards support both but require different hardware, and it gives the user some idea of what tools will be needed to load the kernel.

However, new users must figure out which is appropriate if a board supports both. Often there is one target that experienced users just know to use, and we should make this more clear to new users. Also, having different targets on different boards complicates writing a common tutorial guide for multiple platforms.

This patch adds a new target `make install` that just uses the default for the platform. The expectation is that most users can install the kernel using `make install`. The other targets are of course there for users who need something more specific.

### Testing Strategy

This pull request was tested by using `make install` to flash the kernel on hail.

### TODO or Help Wanted

Thoughts?

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.

2449: arch: cortex-m: update to asm! r=ppannuto a=bradjc

### Pull Request Overview

This pull request switches the last llvm_asm in cortex-m to asm.

This was somewhat straightforward, except that Rust will not let me mark r6 as clobbered (`out("r6") _`) like the other registers. I get:

```
error: invalid register `r6`: r6 is used internally by LLVM and cannot be used as an operand for inline asm
   --> arch/cortex-m/src/lib.rs:254:31
    |
254 |     out("r4") _, out("r5") _, out("r6") _, out("r8") _, out("r9") _,
    |                               ^^^^^^^^^^^
```

I found that if I manually saved r6 in r3 the kernel still works.

tock#1923

### Testing Strategy

Running hail app on hail.

### TODO or Help Wanted

n/a

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.

Co-authored-by: Brad Campbell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request. rfc Issue designed for discussion and to solicit feedback. WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants