change eclipse block comment style - eclipse

I want to change the block comment, globally, from
/*
*
*
*/
to
/*
*/
but keep this style:
/**
*
*
*/
How can I do it?

Related

STM32G030F6 starts program in Flash and after a while it ends up unintentionaly in System Memory

My board have PA14-BOOT0 pin connected to SWDCLK and PA13 to SWDIO.
The BOOT0 pin is not pulled up/down.
According to documentation when nBOOT_SEL bit = 1 and nBOOT0 bit = 1 the BOOT0 pin is ignored and microcontroller boots up from Main Flash. This is the factory setup.
The Flash Option Bytes (address 0x1FFF7800) have default value of 0xDFFFE1AA which I have confirmed (nBOOT_SEL=1, nBOOT0=1).
Im running very basic code:
int main(void)
{
/* Configure the system clock */
SystemClock_Config();
volatile int cnt = 0;
while (1)
{
++cnt;
}
}
/**
* #brief System Clock Configuration
* #retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);
/** 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_ON;
RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
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_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{
Error_Handler();
}
}
When I step the code or run to breakpoint at ++cnt multiple times everything works fine.
But when I let the program run freely and pause after a second the Program Counter shows address 0x1FFFxxxx which is somewhere in System Memory (Bootloader) and debug fails at that point.
I have checked registers for Reset Reason, I have set breakpoints in any interrupt handler I have found in Startup file, I have checked the VTOR for proper addres but I didnt manage to catch the moment the processor jumps to System Memory.
If I pull down the BOOT0 pin with 100k resistor the program starts to work normally. I can run program freely then pause and I will be at the the position ++cnt as I expect.
The question is WHY I need to pull down BOOT0 down even the documentation states clearly that BOOT0 pin is IGNORED when nBOOT_SEL bit = 1 and nBOOT0 bit = 1? What kind of sorcery ;) is going on here that my program jumps to System Memory in the middle of debugging?

STM32 UART : HAL_UART_Transmit_IT Not working with Task

My UART tx Working with blocking mode and before FreeRtoss kernel start. But if I try to transmit inside task Not working( see below code ). Is any special code needed ?
enter code here
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
HAL_UART_Transmit_IT(&huart2, hi, sizeof(hi));
osDelay(1000);
}
/* USER CODE END 5 */
}

How to document nested properties in JSDOC in a readable way?

I'm making my first open source JS plugin for NPM and want to make it well documented.
But the generated documentation of the class constructor looks too large and goes out of my screen.
class Karaoke {
/**
* Magic happen here.
* #constructor
* #param {HTMLElement} element DOM HTML element that used as a Karaoke instance root element.
* #param {object} options Options for the Karaoke instance.
* #param {object[]} options.tracks An array of tracks for the karaoke.
* #param {string} options.tracks[].url Audio file URL.
* #param {string} options.tracks[].bgImg Background image URL for the current track.
* #param {object[]} options.tracks[].lyrics An array of a track lyrics lines.
* #param {string} options.tracks[].lyrics[].text The text of the lyrics line.
* #param {number} options.tracks[].lyrics[].start The time in milliseconds when lyrics line playing must to begin.
* #param {number} options.tracks[].lyrics[].duration The lyrics line playing duration in milliseconds.
* #param {object[]} options.tracks[].lyrics[].keyframes An array of keyframes for the lyrics line CSS playing animation.
* #param {string} options.tracks[].lyrics[].keyframes[].key A key for the lyrics line CSS playing animation.
* #param {number} options.tracks[].lyrics[].keyframes[].value A value for lyrics line CSS playing animation.
*/
constructor( element, options = {} ) {
What I'm doing wrong? Is there some way to make it more readable?
You could leverage the #typedef (type definition) tag
/**
* #typedef {Object} Keyframe
* #property {string} key A key for the lyrics line CSS playing animation.
* #property {number} value A value for lyrics line CSS playing animation.
*/
/**
* #typedef {object} Lyric
* #property {string} text The text of the lyrics line.
* #property {number} start The time in milliseconds when lyrics line playing must to begin.
* #property {number} duration The lyrics line playing duration in milliseconds.
* #property {Keyframe[]} keyframes An array of keyframes for the lyrics line CSS playing animation.
*/
/**
* #typedef {object} Track
* #property {string} url An array of tracks for the karaoke.
* #property {string} bgImg Background image URL for the current track.
* #property {Lyric[]} lyrics An array of a track lyrics lines.
*/
/**
* #typedef {object} Options
* #property {Track[]} tracks An array of tracks for the karaoke.
*/
class Karaoke {
/**
* Magic happen here.
* #constructor
* #param {HTMLElement} element DOM HTML element that used as a Karaoke instance root element.
* #param {Options} options Options for the Karaoke instance.
*/
constructor( element, options = {} ) {
}
}
Which will generate the following HTML documentation:
When you click on the Options link:

How to disable the prompt about Debug Perspective mode switching in eclipse programatically?

#Override
public void createInitialLayout(IPageLayout layout) {
String editor = layout.getEditorArea();
layout.setEditorAreaVisible(true);
layout.addView(VIEW_EXLPORER, IPageLayout.LEFT, 0.20f, editor);
layout.getViewLayout(VIEW_EXLPORER).setCloseable(false);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.80f, editor);
bottom.addView(VIEW_PROGRESS);
bottom.addView(IPageLayout.ID_TASK_LIST);
bottom.addView(IPageLayout.ID_OUTLINE);
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
//shows debug view area here
layout.addView("org.eclipse.debug.ui.DebugView", IPageLayout.LEFT, (float) 0.40, layout.getEditorArea());
}
As you see from my code i already have debug view in my custom perspective but eclipse keep promting me to switch to debug perspective when i start debugging automatically which i would like to avoid this programatically since i do now want to confuse my users.
Any way to follow?
You can try to use DebugUITools.setLaunchPerspective to either let the prompt open your custom perspective instead of the default one or disable the prompt at all.
From its Javadoc:
/**
* Sets the perspective to switch to when a configuration of the given type
* is launched in the given mode. <code>PERSPECTIVE_NONE</code> indicates no
* perspective switch should take place. <code>PERSPECTIVE_DEFAULT</code> indicates
* a default perspective switch should take place, as defined by the associated
* launch tab group extension.
*
* In 3.3 this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>,
* with the parameter 'mode' used in the set modes, and null passed as the delegate
*
* #param type launch configuration type
* #param mode launch mode identifier
* #param perspective identifier, <code>PERSPECTIVE_NONE</code>, or
* <code>PERSPECTIVE_DEFAULT</code>
* #since 3.0
*/

STM32F103 UART button event delay slow

I'm testing very basic transmission with UART1 on my STM32F103C8T6 using CUBE MX and Keil v5.
I've prepared project in CUBE MX enabling UART and went to Keil.
All is working fine to be honest, if I press button on board (PA0), transmitted string changes correctly from stringa1 to stringa2, but it stays on stringa2 for 3 or 4 cycles even if I press and release the button very quickly.
It seems like a problem of synchronization or sort of timing, in shorts, even if button has been released, HAL is sending stringa2 like I have still my finger on button PA0.
What could be the problem?
int main(void)
{
/* USER CODE BEGIN 1 */
char *stringa1 = "ciao\r\n";
char *stringa2 = "pressed\r\n";
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/*
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
HAL_Delay(500);
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
HAL_Delay(500);
*/
if(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0)){
HAL_UART_Transmit(&huart1, (uint8_t*) stringa1, strlen(stringa1), 10);
} else {
HAL_UART_Transmit(&huart1, (uint8_t*) stringa2, strlen(stringa2), 10);
}
HAL_Delay(500);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}