How to add Generic H7B0RBTx that in variant to boards.txt file for compiling in arduino IDE? #2368
Replies: 1 comment · 5 replies
-
Add a linker script as explained in the wiki. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Could you add the link I couldn't find. Thank you for your response |
Beta Was this translation helpful? Give feedback.
All reactions
-
https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29 |
Beta Was this translation helpful? Give feedback.
All reactions
-
I follow the wiki and do everything step by step and when I tried to upload code it is uploading but it can not run the code correctly. I am using directly the MCU so I can not debug it with serial port only I can use is user led that I put in my hardware. You can see my clock configuration and pinout in the photos. And these are my linker script and generic clock. Can anyone help me about this problem I am trying to add Generic STM32H7B0VBTx? WEAK void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
/*AXI clock gating */
RCC->CKGAENR = 0xFFFFFFFF;
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
RCC_OscInitStruct.HSICalibrationValue = 64;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 4;
RCC_OscInitStruct.PLL.PLLN = 35;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 2;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_6) != HAL_OK)
{
Error_Handler();
}
}
#endif /* ARDUINO_GENERIC_* */
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @Aurentiaco35 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes but unfortunately I can not debug it with arduino ide because I am trying that on MCU not an eval board like nucleo. That's why I am trying to understand. This is my arduino part so there isn't any debug option for this code. How can I understand that my code is getting error in some way. because there is some differents with your clock setting and mine and also in linker because when I first generate that there is mutliple part in memory MEMORY and my clock configuration is also different than your example |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am struggling to add Generic H7B0RBTx board to boards.txt for compiling using Arduino IDE. The generic board that is included the Variants in stm32duino/Arduino_Core_STM32. I want to see that board in Boards and try to run code on it. Can anyone help me about it?
I added on boards.txt but I couldn't see in Arduino IDE when I clear arduino-ide file which located in Roaming directory. I can see it and try to build but this time I got the error down below:
arm-none-eabi/bin/ld.exe: cannot open linker script file C:\Users\micro\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.7.1\variants\STM32H7xx\H7A3R(G-I)T_H7B0RBT_H7B3RIT/ldscript.ld: No such file or directory
Beta Was this translation helpful? Give feedback.
All reactions