Skip to content

Enable configUSE_TICK_HOOK on c21#3

Draft
hendav76 wants to merge 2 commits into
masterfrom
tick_hook
Draft

Enable configUSE_TICK_HOOK on c21#3
hendav76 wants to merge 2 commits into
masterfrom
tick_hook

Conversation

@hendav76
Copy link
Copy Markdown

No description provided.

@hendav76 hendav76 requested a review from johandc April 30, 2026 12:27
@hendav76 hendav76 marked this pull request as draft April 30, 2026 12:38
Comment thread src/c21/freertos_hooks.c Outdated
extern void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName);
extern void vApplicationMallocFailedHook(void);
extern void vApplicationIdleHook(void);
extern void vApplicationTickHook( void ) __attribute__((weak));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be weak, FreeRTOS is going to call it, if its enabled, and there is no runtime check for the existence. So the application could be built without an implementation. At least provide a weak deafault implementation if you do.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already an implementation of vApplicationTickHook in this file, and need to declare it weak else the linker will complain of multiple definition of `vApplicationTickHook'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, then remove the extern from the declaration, and put the attribute weak on the implementation further down

@hendav76 hendav76 requested a review from johandc May 5, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants