Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs/tools] Rewrite installation/getting started guides, add HAL support matrix, fixes for Windows, more CI checks #592

Merged
merged 13 commits into from
Mar 30, 2021

Conversation

salkinium
Copy link
Member

@salkinium salkinium commented Mar 24, 2021

  • The Install guide was a nightmare to get to work on a collegues computer, so I setup a Windows VM to test out proper ways of installing the tooling.
  • I restructured all three install guides with headings separating the target groups (AVR, ARM, Hosted) to make it clearer which parts are optional and to be able to link to that directly.
  • I fixed an issue with AvrDude interpreting the : in C:\path as the input format separator.
  • I fixed an issue with OpenOCD backend not having access to /dev/null on Windows
  • The OpenOCD backend cannot be properly started/stopped in the background due to missing Python support. It probably works very differently.
  • Rewrote the guides so that they are less confusing, shorter and more focussed.
  • Moved the "Testing" guide into modm/test/README.md, since it's actually a modm developer guide not a modm user guide. It would be nice to have a guide for custom unit testing, I'll see if I can hammer one out.
  • Renamed the {Blue,Black}-Pill boards and examples for consistent naming with -F103, -F401, -F411 suffix
  • Fixed the F3 Discovery GDB example, it was very outdated.
  • Added the generated homepage HTML as an artifact output.
  • Added additional check for the examples: is the example and example build path valid, are all examples in the CI
  • Add a platform HAL support matrix generated from lbuild information.
  • Add links to module docs for boards and drivers.

Fixes some issues in #591.
Closes #280.

I recommend downloading the homepage HTML artifact from the GH action, extracting the docs folder and then running python3 -m http.server --bind 127.0.0.1 8000 in it to browse the resulting homepage. It's much easier to see that way.

cc @rleh and @WasabiFan.

Copy link
Member

@rleh rleh left a comment

Choose a reason for hiding this comment

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

Nice work 👍🏽

CONTRIBUTING.md Show resolved Hide resolved
docs/src/guide/installation.md Outdated Show resolved Hide resolved
docs/src/guide/installation.md Outdated Show resolved Hide resolved

Unfortunately Windows is not a great fit for the command line tools that modm is
built on. Consider using the [Windows subsystem for Linux (WSL)][winwsl] and
Copy link
Member

Choose a reason for hiding this comment

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

@salkinium Have you tested WSL (and/or WSL2) with modm?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, I should probably do that…

Copy link
Member

Choose a reason for hiding this comment

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

I know @daixtrose was going to use modm on Windows with WSL 2(?); maybe hecan tell us it worked great? 😉

docs/src/guide/installation.md Show resolved Hide resolved
src/modm/board/mini_f401/module.lb Show resolved Hide resolved
@salkinium salkinium force-pushed the feature/windows-install branch 2 times, most recently from 12758ae to 774c06f Compare March 26, 2021 23:19
@@ -143,7 +143,7 @@ jobs:
- name: Examples STM32F4 Without Discovery Board
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_f401re nucleo_f411re nucleo_f429zi nucleo_f446re stm32f411ccu_mini_f401 stm32f411ceu_mini_f411 stm32f407vet6_devebox stm32_f4ve)
(cd examples && ../tools/scripts/examples_compile.py nucleo_f401re nucleo_f411re nucleo_f429zi nucleo_f446re black_pill_f401 black_pill_f411 stm32f407vet6_devebox stm32_f4ve)
Copy link
Member Author

Choose a reason for hiding this comment

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

Fun: stm32f411ccu_mini_f401 was never compiled because it wasn't spelled correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Pimped the tools/scripts/examples_check.py script and a whole host of issues appeared 😱

 $ python3 tools/scripts/examples_check.py

The build path '../build/stm32_f4ve/gui' is outside of the 'modm/build' folder!
 - 'examples/stm32_f4ve/gui/project.xml': '../../../../build/stm32_f4ve/gui'

The build path '../build/arduino_nano/color' is outside of the 'modm/build' folder!
 - 'examples/arduino_nano/color/project.xml': '../../../../build/arduino_nano/color'

Linux CI is missing examples: 'nucleo_f439zi', 'nucleo_f446ze'
    Please add these example folders to the appropriate CI job in
    '.github/workflows/linux.yml'!

@salkinium salkinium force-pushed the feature/windows-install branch 2 times, most recently from 4a14415 to fab1209 Compare March 27, 2021 00:59
@salkinium salkinium force-pushed the feature/windows-install branch 2 times, most recently from 556ca1f to 1646b0f Compare March 27, 2021 21:17
@salkinium
Copy link
Member Author

salkinium commented Mar 27, 2021

There are now more detailed HAL driver tables in the README:

![](https://user-images.githubusercontent.com/163066/112735118-7a787a80-8f4a-11eb-91ed-98545ba4c2a8.png)

@rleh
Copy link
Member

rleh commented Mar 27, 2021

Nice!!

Two ideas:

  • Some controller families don't have peripherals like Ethernet at all. Would be nice to distinguish between "physically not available" and "not (yet) implemented in modm".
  • What about putting the microcontroller families to the columns and peripherals as rows? Then it could also become one big table with all MCU vendors.

@salkinium
Copy link
Member Author

salkinium commented Mar 27, 2021

Some controller families don't have peripherals like Ethernet at all. Would be nice to distinguish between "physically not available" and "not (yet) implemented in modm".

Yes, that's planned. It's just not super trivial to compute generically…

What about putting the microcontroller families to the columns and peripherals as rows? Then it could also become one big table with all MCU vendors.

Meh, I had that on the first try, it was too much visual noise.
Plus the same peripherals are not named the same nor are they truly comparable in features.
Keeping the families separate was much better.

@rleh
Copy link
Member

rleh commented Mar 27, 2021

Keeping the families separate was much better.

I'm sure I looks a lot better, but for actual use-cases ("Which controller should I choose if I need peripherals X, Y & Z?") one large table is much better suited in my opinion.

@salkinium
Copy link
Member Author

salkinium commented Mar 28, 2021

I've added the mapping of available, but not implemented drivers via a cross, which I hope is understandable. What do you think? A question mark maybe?

![](https://user-images.githubusercontent.com/163066/112738263-aa7f4800-8f61-11eb-905c-3b2cc334d6eb.png)

I'm sure I looks a lot better, but for actual use-cases ("Which controller should I choose if I need peripherals X, Y & Z?") one large table is much better suited in my opinion.

Sure, but wouldn't that be much better with a complete table plus a JS filter? And you would probably want to query some more things related to pinout as well. I think that would be really amazing…

These tables are "just" about setting the right expectations about what the state of the HAL actually is for STM32. I don't want to put too much info on the front page or it'll scare people off.

@salkinium
Copy link
Member Author

I "fixed" running OpenOCD in the background on Windows only to discover that arm-none-eabi-gdb does not support TUI mode on Windows and gdbgui dropped Windows support recently due to lack of gevents support.

So… I'm going to keep the fix but I cannot test it. Meh.

@rleh
Copy link
Member

rleh commented Mar 28, 2021

Proposal for a legend:

Available Not yet implemented Hardware does not exist
🔜

@salkinium
Copy link
Member Author

salkinium commented Mar 28, 2021

I specifically chose non-emoji, monocolor symbols since they get filled with the chosen text color.

I definitely prefer the empty cell over anything else. This is what it looks like with dark theme, the arrow-soon emoji is barely readable:

![](https://user-images.githubusercontent.com/163066/112756243-93356e80-8fe4-11eb-969e-99c6d68a16e3.png)

Here is a test with a • instead of a cross for less optical noise, I think it's better than the cross.

![](https://user-images.githubusercontent.com/163066/112756310-ddb6eb00-8fe4-11eb-84e3-707f531a8e67.png)

There's an even thinner dot…

![](https://user-images.githubusercontent.com/163066/112756537-f70c6700-8fe5-11eb-8099-9281187fd542.png)

@rleh
Copy link
Member

rleh commented Mar 28, 2021

I consider the first one much more expressive and clear.

@salkinium
Copy link
Member Author

salkinium commented Mar 28, 2021

I consider the first one much more expressive and clear.

Eh… really? Maybe without the red cross:

![](https://user-images.githubusercontent.com/163066/112756684-a9dcc500-8fe6-11eb-87c4-61f82856b2fb.png)

I would prefer the one with the small dot. It think channels your view first to the implemented drivers, then to the drivers not implemented yet and then to the unavailable drivers.

@rleh
Copy link
Member

rleh commented Mar 28, 2021

With this table I don't get which peripherals are not supported by modm and which are not available in hardware without reading the text...

@rleh
Copy link
Member

rleh commented Mar 28, 2021

I don't want to put too much info on the front page or it'll scare people off.

People are more likely to get scared off by information that is hard to understand than by a table with many entries (that we could put inside a <details> ... </details> section).

I expect the most readers of this README to not know what exactly "RCC", "UID", "COMP", "ETH", "FSMC", "RNG", "EXTINT" and "GCLK" refer to. (Not even I know for sure what all the names are about.)

@rleh
Copy link
Member

rleh commented Mar 28, 2021

Maybe:

Available Not implemented Hardware does not exist
(✓)

(non-colored icons; I personally prefer colored icons (which use the full color range of modern screens), but that is a matter of taste...)

@salkinium
Copy link
Member Author

salkinium commented Mar 28, 2021

Hmmm, visually attention wise it's like: "(✓)" > "✓" > "✗"

![](https://user-images.githubusercontent.com/163066/112757166-e14c7100-8fe8-11eb-858b-a1ee10eafe0c.png)

This is like: "✓" > "·" > ""

![](https://user-images.githubusercontent.com/163066/112757181-ead5d900-8fe8-11eb-800c-e7c2706841c5.png)

What about this?

![](https://user-images.githubusercontent.com/163066/112757260-4607cb80-8fe9-11eb-9f35-0c29814ccf5d.png)

@salkinium
Copy link
Member Author

salkinium commented Mar 28, 2021

People are more likely to get scared off by information that is hard to understand than by a table with many entries (that we could put inside a <details> ... </details> section).

Ok, fair point, let me try to put a big combi table in details there.

@salkinium
Copy link
Member Author

No pressure, but I would like to land this within this week for the 2021q1 release.

Copy link
Member

@rleh rleh left a comment

Choose a reason for hiding this comment

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

Really nice work! Thank you very much @salkinium!

<td align="center">SAMD21-MINI</td>
<td align="center">STM32-F4VE</td>
<td align="center">STM32F030F4P6-DEMO</td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-al-avreb-can">AL-AVREB-CAN</a></td>
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a link to https://docs.modm.io/develop/api/al-avreb-can/ would be more useful here? The module reference page has only very little information.

Copy link
Member

Choose a reason for hiding this comment

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

Or better: All board module reference pages should contain links to https://docs.modm.io/

Copy link
Member Author

Choose a reason for hiding this comment

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

The plan was to link all modules to the Doxygen docs, I just couldn't get my code to work yet (dealing with ambiguous destinations).

Copy link
Member Author

Choose a reason for hiding this comment

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

See also #598.

docs/src/guide/custom-project.md Outdated Show resolved Hide resolved
docs/src/guide/installation.md Show resolved Hide resolved
docs/src/guide/installation.md Show resolved Hide resolved
src/modm/board/module.lb Show resolved Hide resolved
@rleh
Copy link
Member

rleh commented Mar 30, 2021

Maybe you should somehow rename this PR, because "Windows installation" is only a very small part.

@salkinium salkinium changed the title [docs/tools] Improve Windows installation and support [docs/tools] Rewrite installation/getting started guides, add HAL support matrix, fixes for Windows, more CI checks Mar 30, 2021
Copy link
Member

@chris-durand chris-durand left a comment

Choose a reason for hiding this comment

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

Very nice, thanks!

README.md Show resolved Hide resolved
docs/src/guide/custom-project.md Outdated Show resolved Hide resolved
@salkinium
Copy link
Member Author

I also checked the generated homepage with broken-link-checker and fixed all links. Unfortunately https://eurobot.org is down?

@salkinium salkinium mentioned this pull request Mar 30, 2021
12 tasks
@salkinium salkinium added the ci:hal Triggers the exhaustive HAL compile CI jobs label Mar 30, 2021
@salkinium
Copy link
Member Author

I'll be merging this next.

@salkinium salkinium merged commit c528dc2 into modm-io:develop Mar 30, 2021
@salkinium
Copy link
Member Author

Got this close to perfection… BLC didn't complain, since it wasn't a link… 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:hal Triggers the exhaustive HAL compile CI jobs documentation 📑 fix 💎
Development

Successfully merging this pull request may close these issues.

Getting Started guide is confusing
3 participants