Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


You are viewing a reply to undefined reference to `_times'  

undefined reference to `_times'

France

Hi,

Obviously, it’s not in this routine that you reference times; however, as you provide assembly code, the fact you call this function will link in your program all other code from the same source file, so I suspect the problem may come from other pieces of code in the same file (even if they are not called...)

Note that the times’ C library routine is useless on an MCU (it summarize execution time for a linux process and its children) and needs a support function called _times’’ to gather these, function that does not exist as it has no use. You could just provide it in syscalls.c by adding:

#include "sys/times.h"
clock_t _times(struct tms* tms) {
    errno = EINVAL;
    return (clock_t)-1;
}

However this will just allow your code to link, but either it will not work as expected (if times if effectively called) or will contain dead code (due to your assembly-level code).

Just a question: why did you code in assembly language, instead of C? Your function could as well have been written in C; moreover you seem to pass only one single parameter in the R3 register, which is quite unusual (parameters must be passed in R0, R1, R2 and R3, that do not have to be saved as they are scratch registers). As is, your function could only be called from assembly-level code, not from C code.

Bernard (Ac6)