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

Zephyr on bluenrg2 #2

Open
Thibaultva opened this issue Feb 19, 2023 · 2 comments
Open

Zephyr on bluenrg2 #2

Thibaultva opened this issue Feb 19, 2023 · 2 comments

Comments

@Thibaultva
Copy link

Hi, I try to use your zephyr implementation on bluenrg 2 for a home project. The project is building correctly but when flashing the binary on the board (STEVAL-IDB008V2) nothing is working (LED or UART) is your implementation working ? Did you keep the original bootloader from ST (UART bootloader) ? I flash binary at 0x10040000 as in bluenrg.dtsi using ST tool.
I looked at the pinout, flash and clock configuration all seem fine to me so I really don’t understand what i’m missing.

Thank you

@Aukstkalnis
Copy link
Owner

Hi. This project is not going to work. I and my college was working on adding bluenrg support to zephyr without touching zephyr itself but failed to do so. It was much easier to fork zephyr and just add soc there. I added this implementation at the beginning for syncing code out of company's git server because of some VPN issues. And on top of that we were green on zephyr RTOS so we did not invested any more time than this. You can try to fork this project and try to continue the work, but you will need to copy a lot of zephyr modules and edit them in your folder. You may probably need to even rename some Kconfig parameters to not duplicate zephyr Kconfig parameters because that will cause a lot of confuse and build errors. At least I was facing these issues. I thought that I just simply create driver and treat it as if it was zephyr's in tree module. But that is not how zephyr does things. At least not in 2.2.x venison, that we were working with. Maybe something changed for out of tree soc...

Since I am not working with bluenrg for about 1-2 years I am not sure that I can help you. One thing to note is that linker script is missing some code from official bluenrg linker script. And be aware of tickles OS. If zephyr's interupt takes longer then bluenrg's then system hands or vice versa. I do not remember. I think that the culprit was tickless OS. We disabled it and changed TICK count or something. This issue while using bluenrg's sleep mode.

@Aukstkalnis
Copy link
Owner

I forgot about bootloader. The original bootloader is standart STM32 bootloader (maybe with some tweeksbut the point the same) and is not removable. We used MCUBoot. The problem with using MCUBootloader was vector table. zephyr has dynamic vector table but needs some specific configuration to enable it. Since I was not familiar with zephyr, I just simply added copy vector table to RAM (wasting about 200 bytes) and enabled vector table to be loaded from RAM. The same for bootloader. I think in this project there are no changed related to vector table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants