Closed davefes closed 7 months ago
Hi, you are right, there was a mpconfigboard.h
for each flash variant. Now I have merged them into one. Thank you for bring this topic up and it made me realise that the description is quite long, so I added a index to those sections. Now, if you click on How to build, it will take you to the guide on how to build the desired firmware yourself.
For a short answer:
For 8MHz crystal with SIZE_IN_MB
MB spi flash :
make -j BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS CRYSTAL_FREQ=ANY_VALUE SPI_FLASH_SIZE=SIZE_IN_MB
For 25MHz crystal with SIZE_IN_MB
MB spi flash, you have to leave CRYSTAL_FREQ
out:
make -j BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS SPI_FLASH_SIZE=SIZE_IN_MB
I am aware that the name CRYSTAL_FREQ
is counter intuitive, I suggest you to think/use it this way: The default crystal uses 25MHz, set CRYSTAL_FREQ=8
if and only if you are using 8MHz crystal.
CRYSTAL_FREQ
or OSC_FREQ
make sense to me.
CRYSTAL_FREQ: You can assign any value to this, if this keyword is defined, the 8MHz crystal firmware will be built. You can not make it take the given value, because plli2svalues.py reads the .h files directly. (More of a reminder for myself.) SPI_FLASH_SIZE: You can set the SPI_FLASH_SIZE here to build your firmware accordingly. make -j LTO=1 BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS CRYSTAL_FREQ=no_care SPI_FLASH_SIZE=SIZE_IN_MB # With recent update, the LTO=1 can be omitted.
Could you say CRYSTAL_FREQ=8
and remove the term ANY_VALUE
as in your response to this issue?
Likewise in the quoted text above would CRYSTAL_FREQ=no_care
be only for 25MHz? Maybe, just get rid of CRYSTAL_FREQ=no_care
?
For 8MHz crystal: (even though it does not matter, just say 8)
make -j BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS CRYSTAL_FREQ=8 SPI_FLASH_SIZE=SIZE_IN_MB
For 25MHz crystal, you have to leave CRYSTAL_FREQ out:
make -j BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS SPI_FLASH_SIZE=SIZE_IN_MB
Edit: I am probably misunderstanding what no_care
means or what it does in this context.
Hi, thanks for the suggestion. And sorry for the very late response, life has been busy.
Edit: I am probably misunderstanding what no_care means or what it does in this context.
Well, with no_care
i meant: you can assign any value to it, as long/soon as the variable has been defined, it uses the 8MHz version. This is actually how this works under the hood. I was hoping, that clarifying this will take some confusion people may get when they are using, for example, a 12MHz crystal. If they were thinking, that CRYSTAL_FREQ
actually assigns a value related to the given number, they may wondering why their device doesn't boot. BUT: It's a really dumb naming scheme by me, for now. There's no doubt in that. Initially, I was hoping to find some solutions to bypass the pllvalue.py
issue, and I will be working on that when I get time again. Maybe there is a way to make this variable actually assign values to the PLLs, that's why I give it this name.
To the rest
Ye, that is much more clear way to describe it. On my way to change it. Thanks!
The examples have made that part clear.
Does this statement need to change?
make -j LTO=1 BOARD=WEACTF411CE BOARD_VARIANT=VARIANTS CRYSTAL_FREQ=ANY_VALUE SPI_FLASH_SIZE=SIZE_IN_MB # With recent update, the LTO=1 can be omitted.
... specifically the `ANY_VALUE' parameter.
I was hoping, that clarifying this will take some confusion people may get when they are using, for example, a 12MHz crystal. If they were thinking, that CRYSTAL_FREQ actually assigns a value related to the given number, they may wondering why their device doesn't boot.
Regarding this, I intentionally left it there.
OK
I am sure that there use to be a
mpconfigboard.h
for each flash variant and possibly for 8MHz and 25MHz. With only onempconfigboard.h
how do you specify which board that you want to build for?