Tool/software:
So, I'm about to start using the ti dev fork in git for the MSPM0G3507. Is there some kind of doc, or instruction somewhere for zephyr/west newbies?
I have installed the main zephyr stuff, with the suggested ~/zephyrproject path.
I have moved zephyr-mspm0_dev_stable here, so I have two zephyr subdirectories.
Using e.g. "west -z zephyr-mspm0_dev_stable boards" does not look to cut it.
If I edit .west/config from
[manifest]
path = zephyr
file = west.yml
[zephyr]
base = zephyr
to
[manifest]
path = zephyr-mspm0_dev_stable
file = west.yml
[zephyr]
base = zephyr-mspm0_dev_stable
and then run west boards, get an error
ERROR: SoC 'mspm0l222x' is not found, please ensure that the SoC exists and that soc-root containing 'mspm0l222x' has been correctly defined.
So, I'm guessing this is also not the way to do it.
Any advice appreciated!
Hi, thanks for the question! I would recommend looking at this as a quick start guide for Zephyr: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
Also, what OS are you using for development?
-Brian
Hi,
As I wrote, I already installed Zephyr fully (I have now switched over to stm32, to get going with my project for now). My question is how I can make use of the ti fork instead. My main decision was to try to use MSPM0G3507 for this project, if possible.
Ti fork is needed, since MSPM0G3507 is not in mainline.
I presume I can have it in parallel, as I described above, but I don't understand how to actually switch. Is it correct to change the .west/config, if so, why do I get this error? I'm guessing therefore that this is not how it is intended.
I'm on linux.
Thanks
For a new zephyr install just delete the entire zephyr folder, clone the ti fork, and checkout the branch.
OK, this is not how to do it according to Zephyr docs, but I tried it. Same issue. So maybe Ti fork is not compatible with the newer Zephyr installation, or there are bugs in the Ti fork.
I guess I can try to symlink all files that are related to mspm0g3507 into the official repo, to see if that works. I'll try this later this week, or choose another MCU in worst case. It would be a pity though, since the mspm0g3507 fits the bill perfectly.
Have you also done these steps to get Zephyr+ M0 up and running?
cd ~/zephyrproject git clone https://<your_token>@github.com/msp-ti/zephyr.git cd modules/hal git clone https://<your_token>@github.com/msp-ti/hal_ti.git ti cd ~/zephyrproject/zephyr git checkout mspm0_upstream cd ~/zephyrproject/modules/hal/ti git checkout remotes/origin/mspm0_upstream cd ~/zephyrproject/zephyr west build -p always -b lp_mspm0g3507 samples/basic/blinky
Well, I tried to follow your last git stuff, but the directory structures did not match, so I am not 100% sure I got everything. (e.g. there's no modules/hal/ in my setup, only modules/hal_nordic, hal_st, etc etc. However, I can now build, blinky, but when I run west flash, it fails.
Coppying the failing line, and executing by itself, I get
$ /home/m/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -s /home/m/zephyrproject_msp0g/zephyr/boards/ti/lp_mspm0g3507/support -s /home/m/zephyr-sd
k-0.17.0/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts -f /home/m/zephyrproject_msp0g/zephyr/boards/ti/lp_mspm0g3507/support/openocd.cfg '-c init' '-c targets' -c 'reset init' -c 'flash write_image erase /home/m/zephyrproject_msp0g/zephyr/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown
Open On-Chip Debugger 0.11.0+dev-00728-gb6f95a16c-dirty (2024-10-20-01:26)
Licensed under GNU GPL v2
For bug reports, read
openocd.org/.../bugs.html
/home/m/zephyrproject_msp0g/zephyr/boards/ti/lp_mspm0g3507/support/openocd.cfg:4: Error: Can't find target/ti_mspm0.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
at file "/home/m/zephyrproject_msp0g/zephyr/boards/ti/lp_mspm0g3507/support/openocd.cfg", line 4
ti_mspm0.cfg is not a file on my filesystem. Should it be generated, or is this available from some git repo?
Ok from here, lets make sure we have everything for the M0. Can you see if the following is in your openocd.cfg
# TI MSPM0L1306 LaunchPad Evaluation Kit
# https:
//www.ti.com/tool/LP-MSPM0L1306
# TI MSPM0G3507 LaunchPad Evaluation Kit
# https:
//www.ti.com/tool/LP-MSPM0G3507
#
source [find
interface
/xds110.cfg]
adapter speed
10000
transport select swd
source [find target/ti_mspm0.cfg]
--------------------------------------------------------------
and that this is somewhere in your board.cmake :
# SPDX-License-Identifier: Apache-
2.0
board_runner_args(openocd
"--cmd-pre-load=reset init"
)
# unprotect sectors before running
board_runner_args(openocd
"--cmd-pre-load=flash protect 1 0 last off"
)
board_runner_args(openocd
"--cmd-pre-load=flash erase_sector 1 0 last"
)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Hi again,
I realized that the branch that you asked me to use, is much older, and does not have support most of mspm0g3507 devices. Is there a reason you are suggesting to use that? E.g. i2c, spi, can, adc is not available in the mspm0_upstream branch, so it is mostly an unusable branch.
I think there was an issue on our side, try to pull it again and see if this fixes the issue.
-Brian
So, this is basically useless? I mean, there's no working support for any of the internal devices of the mspm0g3507, the only way to even build this, is to checkout a version from the stone age which only has gpio support and uart.
And, even if this is done (stone age, without any device support), it is still not possible to flash it onto the board.
What a waste of time.
There are definitely more support for the peripherals other than GPIO and UART. The hal/ti is definitely needed so if you are missing that in your directory, that's most likely the reason you are not seeing the support for the G3507 peripherals. Can you retry cloning that GOT repository into the respective directory?
Are you talking about the old mspm0_upstream, or the mspm0_dev_stable now?
mspm0_upstream, the one you recommended, from git, just now;
identifier: lp_mspm0g3507
name: LP_MSPM0G3507
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 32
flash: 128
supported:
- gpio
- pinctrl
- uart
vendor: ti
mspm0_dev_stable has more, but you said you had issues with it, and at the time I tested it, and it would not build, confirming your statement it was broken.
None of them has a working west flash, since they are missing the file previously mentioned. And since you could not emit it, and it is supposed to be in the sdk, I'll have to wait for a new sdk to arrive, and hope it will be there. Right?
Yes I misspoke on the mspupstream, I meant the mspm0_dev_stable. Have you tried pulling it again from the mspm0_dev_stable after we made the fix on our side?
Glad to hear that it is now successfully compiling for you. I am still not sure why the ti_mspm0.cfg is missing. Let me discuss internally and I will get back to you once I have a potential solution for you.
-Brian
Hi Brian,
Any news on this? I read somewhere that Ti is considering/intending(?) to support programming/debugging in CCS instead/as well?
Could this be a way forward from here? I'm close to switch over to a STM part instead, but I have already invested some into the mspm0, so ideally you have a solution..
Hi, after discussing this internally, can you try the following to fix this issue:
Go to folder and run:
cd <cloned_OPENOCD_dir> . /bootstrap (when building from the git repository) . /configure -- enable -xds110 make sudo make install |
If using a new device, you need to add the following files to zephyr/boards/arm/lp_mspm0xxxxx
# SPDX-License-Identifier: Apache- 2.0 include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
# SPDX-License-Identifier: GPL- 2.0 -or-later # Copyright (C) 2023 Texas Instruments Incorporated - https: //www.ti.com/ # # TI MSPM0L1306 LaunchPad Evaluation Kit # https: //www.ti.com/tool/LP-MSPM0L1306 # TI MSPM0G3507 LaunchPad Evaluation Kit # https: //www.ti.com/tool/LP-MSPM0G3507 # source [find interface /xds110.cfg] adapter speed 10000 source [find target/ti_mspm0.cfg] |
In the Zephyr branch, run the following command to flash device (assuming example was already built)
west flash --openocd <cloned_OPENOCD_dir> /src/openocd --openocd-search <cloned_OPENOCD_dir> /tcl/ |
**Attention** This is a public forum