Trying to do a port to the 446 because there are some pretty nice boards with the 446. I had to (get a new computer thats 64bit(I hate windows10 so much)) change a few files it looks like a lot is stripped down for just 407, almost got it to compile (I think) but I am now stuck, if you have any insight you can provide, that would be appreciated. And your patience is appreciated.
I dont know what to do with the RNG/RTC stuff, like where to define or disable, and probably the build offset needs to change but im not finding one in the marlin source for it.
Code:
Building project firmware (OCTOPUSV1.1, ARMC6)
Scan: OS5-SKRv2-Remora
Using ROM region application in this build.
Region application: size 0x78000, offset 0x8008000
Compile [100.0%]: trng_api.c
[Warning] <command line>@30,25: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
[Error] trng_api.c@98,5: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
[Error] trng_api.c@98,5: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
[Error] trng_api.c@101,8: incomplete definition of type 'struct trng_s'
[Error] trng_api.c@101,28: use of undeclared identifier 'RNG'
[Error] trng_api.c@102,8: incomplete definition of type 'struct trng_s'
[Error] trng_api.c@102,25: use of undeclared identifier 'HAL_RNG_STATE_RESET'; did you mean 'HAL_RTC_STATE_RESET'?
[Error] trng_api.c@103,8: incomplete definition of type 'struct trng_s'
[Warning] trng_api.c@112,9: implicit declaration of function 'HAL_RNG_Init' is invalid in C99 [-Wimplicit-function-declaration]
[Error] trng_api.c@112,26: incomplete definition of type 'struct trng_s'
[Warning] trng_api.c@117,9: implicit declaration of function 'HAL_RNG_GenerateRandomNumber' is invalid in C99 [-Wimplicit-function-declaration]
[Error] trng_api.c@117,42: incomplete definition of type 'struct trng_s'
[Warning] trng_api.c@133,5: implicit declaration of function 'HAL_RNG_DeInit' is invalid in C99 [-Wimplicit-function-declaration]
[Error] trng_api.c@133,24: incomplete definition of type 'struct trng_s'
[Error] trng_api.c@140,5: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
[Warning] trng_api.c@159,13: implicit declaration of function 'HAL_RNG_GenerateRandomNumber' is invalid in C99 [-Wimplicit-function-declaration]
[Error] trng_api.c@159,46: incomplete definition of type 'struct trng_s'
[Warning] trng_api.c@171,10: implicit declaration of function '__HAL_RNG_GET_FLAG' is invalid in C99 [-Wimplicit-function-declaration]
[Error] trng_api.c@171,33: incomplete definition of type 'struct trng_s'
[Error] trng_api.c@171,44: use of undeclared identifier 'RNG_FLAG_CECS'
[Error] trng_api.c@171,60: use of undeclared identifier 'RNG_FLAG_SECS'
[ERROR] In file included from <built-in>:371:
<command line>:30:25: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define TARGET_OCTOPUSV1.1 1
^
.\mbed-os\targets\TARGET_STM\trng_api.c:98:5: error: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
__HAL_RCC_RNG_CLK_ENABLE();
^
./mbed-os/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_rcc_ex.h:4058:63: note: expanded from macro '__HAL_RCC_RNG_CLK_ENABLE'
SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\
^
.\mbed-os\targets\TARGET_STM\trng_api.c:98:5: error: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
./mbed-os/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_rcc_ex.h:4060:73: note: expanded from macro '__HAL_RCC_RNG_CLK_ENABLE'
tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\
^
.\mbed-os\targets\TARGET_STM\trng_api.c:101:8: error: incomplete definition of type 'struct trng_s'
obj->handle.Instance = RNG;
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:101:28: error: use of undeclared identifier 'RNG'
obj->handle.Instance = RNG;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:102:8: error: incomplete definition of type 'struct trng_s'
obj->handle.State = HAL_RNG_STATE_RESET;
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:102:25: error: use of undeclared identifier 'HAL_RNG_STATE_RESET'; did you mean 'HAL_RTC_STATE_RESET'?
obj->handle.State = HAL_RNG_STATE_RESET;
^~~~~~~~~~~~~~~~~~~
HAL_RTC_STATE_RESET
./mbed-os/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_rtc.h:66:3: note: 'HAL_RTC_STATE_RESET' declared here
HAL_RTC_STATE_RESET = 0x00U, /*!< RTC not yet initialized or disabled */
^
.\mbed-os\targets\TARGET_STM\trng_api.c:103:8: error: incomplete definition of type 'struct trng_s'
obj->handle.Lock = HAL_UNLOCKED;
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:112:9: warning: implicit declaration of function 'HAL_RNG_Init' is invalid in C99 [-Wimplicit-function-declaration]
if (HAL_RNG_Init(&obj->handle) != HAL_OK) {
^
.\mbed-os\targets\TARGET_STM\trng_api.c:112:26: error: incomplete definition of type 'struct trng_s'
if (HAL_RNG_Init(&obj->handle) != HAL_OK) {
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:117:9: warning: implicit declaration of function 'HAL_RNG_GenerateRandomNumber' is invalid in C99 [-Wimplicit-function-declaration]
if (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
^
.\mbed-os\targets\TARGET_STM\trng_api.c:117:42: error: incomplete definition of type 'struct trng_s'
if (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:133:5: warning: implicit declaration of function 'HAL_RNG_DeInit' is invalid in C99 [-Wimplicit-function-declaration]
HAL_RNG_DeInit(&obj->handle);
^
.\mbed-os\targets\TARGET_STM\trng_api.c:133:24: error: incomplete definition of type 'struct trng_s'
HAL_RNG_DeInit(&obj->handle);
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:140:5: error: use of undeclared identifier 'RCC_AHB2ENR_RNGEN'
__HAL_RCC_RNG_CLK_DISABLE();
^
./mbed-os/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_rcc_ex.h:4063:58: note: expanded from macro '__HAL_RCC_RNG_CLK_DISABLE'
#define __HAL_RCC_RNG_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_RNGEN))
^
.\mbed-os\targets\TARGET_STM\trng_api.c:159:13: warning: implicit declaration of function 'HAL_RNG_GenerateRandomNumber' is invalid in C99 [-Wimplicit-function-declaration]
if (HAL_RNG_GenerateRandomNumber(&obj->handle, (uint32_t *)random) != HAL_OK) {
^
.\mbed-os\targets\TARGET_STM\trng_api.c:159:46: error: incomplete definition of type 'struct trng_s'
if (HAL_RNG_GenerateRandomNumber(&obj->handle, (uint32_t *)random) != HAL_OK) {
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:171:10: warning: implicit declaration of function '__HAL_RNG_GET_FLAG' is invalid in C99 [-Wimplicit-function-declaration]
if ((__HAL_RNG_GET_FLAG(&obj->handle, (RNG_FLAG_CECS | RNG_FLAG_SECS))) != 0) {
^
.\mbed-os\targets\TARGET_STM\trng_api.c:171:33: error: incomplete definition of type 'struct trng_s'
if ((__HAL_RNG_GET_FLAG(&obj->handle, (RNG_FLAG_CECS | RNG_FLAG_SECS))) != 0) {
~~~^
./mbed-os/hal\trng_api.h:30:16: note: forward declaration of 'struct trng_s'
typedef struct trng_s trng_t;
^
.\mbed-os\targets\TARGET_STM\trng_api.c:171:44: error: use of undeclared identifier 'RNG_FLAG_CECS'
if ((__HAL_RNG_GET_FLAG(&obj->handle, (RNG_FLAG_CECS | RNG_FLAG_SECS))) != 0) {
^
.\mbed-os\targets\TARGET_STM\trng_api.c:171:60: error: use of undeclared identifier 'RNG_FLAG_SECS'
if ((__HAL_RNG_GET_FLAG(&obj->handle, (RNG_FLAG_CECS | RNG_FLAG_SECS))) != 0) {
^
6 warnings and 15 errors generated.