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

MKS CANable V2.0 #81366

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KozhinovAlexander
Copy link
Collaborator

add new board MKS CANable V2.0 Please refer to added documentation for more information.
The hardware of the board can be dound under: https://github.com/makerbase-mks/CANable-MKS

@KozhinovAlexander
Copy link
Collaborator Author

@henrikbrixandersen You will see an overlay for this board in CANnectivity later. ;) Thus please take a look too.

@KozhinovAlexander KozhinovAlexander force-pushed the mks_canable_v2 branch 2 times, most recently from ce12700 to b6f5079 Compare November 13, 2024 23:59
@KozhinovAlexander KozhinovAlexander requested review from erwango, decsny and galak and removed request for galak and decsny November 13, 2024 23:59
@KozhinovAlexander KozhinovAlexander changed the title Add new board MKS CANable V2.0 MKS CANable V2.0 Nov 14, 2024
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Board is OK, please fix ordering issue

@KozhinovAlexander
Copy link
Collaborator Author

Board is OK, please fix ordering issue

Thank you for you review. Great to see a feedback from hwv2 guy :) I'll do necessary changes today late night.

boards/makerbase/mks_canable_v20/doc/index.rst Outdated Show resolved Hide resolved
boards/makerbase/mks_canable_v20/doc/index.rst Outdated Show resolved Hide resolved
boards/makerbase/mks_canable_v20/doc/index.rst Outdated Show resolved Hide resolved
boards/makerbase/mks_canable_v20/doc/index.rst Outdated Show resolved Hide resolved
boards/makerbase/mks_canable_v20/doc/index.rst Outdated Show resolved Hide resolved
boards/makerbase/mks_canable_v20/mks_canable_v20.dts Outdated Show resolved Hide resolved
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Updates need squashing i.e. 2 commits

@KozhinovAlexander
Copy link
Collaborator Author

Updates need squashing i.e. 2 commits

Thank you. It is done now.

@nordicjm
Copy link
Collaborator

Updates need squashing i.e. 2 commits

Thank you. It is done now.

So the second vendor update commit needs squashing into the first vendor update commit and the second board commit needs squashing into the first board commit. Something like this:

git rebase -i 40cd35e56d43716bdbdeafafa6c356407121ca2e
  change first to edit, third to fixup, forth to drop
git cherry-pick ddf9bfdf02006c2dc4e2012ae5ad93a3a0fde584
git rebase --continue
git rebase -i 40cd35e56d43716bdbdeafafa6c356407121ca2e
  change second to fixup

Now you should have 2 commits

@KozhinovAlexander
Copy link
Collaborator Author

Updates need squashing i.e. 2 commits

Thank you. It is done now.

So the second vendor update commit needs squashing into the first vendor update commit and the second board commit needs squashing into the first board commit. Something like this:

git rebase -i 40cd35e56d43716bdbdeafafa6c356407121ca2e
  change first to edit, third to fixup, forth to drop
git cherry-pick ddf9bfdf02006c2dc4e2012ae5ad93a3a0fde584
git rebase --continue
git rebase -i 40cd35e56d43716bdbdeafafa6c356407121ca2e
  change second to fixup

Now you should have 2 commits

Got it. Will do.

nordicjm
nordicjm previously approved these changes Nov 18, 2024
Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

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

Given that upstream threats this as one of multiple board variants (see https://github.com/makerbase-mks/CANable-MKS), I think we might want to do the same (bu renaming the board folder etc.). Support for the V1.0 and the PRO editions can then be added later on. What do you think?

boards/makerbase/index.rst Show resolved Hide resolved
boards/makerbase/mks_canable_v20/board.yml Show resolved Hide resolved
********

The Makerbase MKS CANable V2.0 board features an ARM Cortex-M4 based STM32G431C8 MCU
with a wide range of connectivity support and configurations.
Copy link
Member

@henrikbrixandersen henrikbrixandersen Nov 18, 2024

Choose a reason for hiding this comment

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

A range of? Not on this board, so I think that can be removed from the board description.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

MCU supports a range of.... But in terms of board I agree and will update

Comment on lines +60 to +61
The stm32g431c8 mcu is the core of MKS CANable V2.0 board and it has 6 GPIO controllers.
These controllers are responsible for pin muxing, input/output, pull-up, etc.
Copy link
Member

Choose a reason for hiding this comment

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

This is not that important for the board configuration and could be removed.

Comment on lines +14 to +15
- rng
- counter
Copy link
Member

Choose a reason for hiding this comment

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

Have you ran the tests for these?

- pinctrl
- usb_device
- usbd
- watchdog
Copy link
Member

Choose a reason for hiding this comment

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

Same here?

CONFIG_GPIO=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_ENTROPY_GENERATOR=y
Copy link
Member

@henrikbrixandersen henrikbrixandersen Nov 18, 2024

Choose a reason for hiding this comment

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

Why is CONFIG_ENTROPY_GENERATOR enabled?

Comment on lines +28 to +37
if {[version_compare $current_version "0.12.0"] >= 0} {
# OpenOCD version is 0.12.0 or newer
init
rtt setup 0x20000000 10000 "SEGGER RTT"
rtt start
rtt server start 9090 0
} else {
# OpenOCD version is older than 0.12.0
echo "Warn: Segger RTT is not supported for this OpenOCD version: $current_version"
}
Copy link
Member

Choose a reason for hiding this comment

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

This looks very generic and should probably not just be set for one board. It could go into a common OpenOCD configuration file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean by common the configuration file delivered with OpenOCD itself?

Copy link
Member

@henrikbrixandersen henrikbrixandersen Nov 24, 2024

Choose a reason for hiding this comment

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

I meant boards/common/openocd.board.cmake. I would suggest submitting this in a separate PR.

dts/bindings/vendor-prefixes.txt Show resolved Hide resolved
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
Copy link
Member

Choose a reason for hiding this comment

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

Where is PWM used on this board?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Planned to use it for PWM LED since i see LEDs on th board as way to bright. But for the current PR it may be removed - agree.

Add Makerbase Co., Ltd. board vendor

Signed-off-by: Alexander Kozhinov <[email protected]>
A cheap and affordable stm32g4 based simple CAN and CAN-FD to usb
adapter board

Reviewed-by: Erwan Gouriou <[email protected]>
Signed-off-by: Alexander Kozhinov <[email protected]>
.. _boards-makerbase:

Makerbase
##################
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
##################
#########

toolchain:
- zephyr
- gnuarmemb
- xtools
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- xtools

#80466

boards/makerbase/index.rst Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants