Hi i have the following problem:
i have added a call function in the crt0.c before the main call
init_FPB();
main();
i include my file .h (that contains the body of the function init_FPB) in the crt0.c file and so works.
but if I want to specify the body of the function in a file .c and leave only his signature in the. h does not work why?
I included file .c in the project but doesnt work.
modify crt0.c file
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: modify crt0.c file
Giovanni i need to modify it because i need some operation before main() function. Can you help me pls?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: modify crt0.c file
You may use an initializer function, see the GCC documentation, or use __late_init() in board.c.
Giovanni
Giovanni
Re: modify crt0.c file
Giovanni sono un tirocinante alla laurea magistrale presso l'università Federico II di Napoli. Durante l'attività di tirocinio sto utilizzando ChibiOS.
Avrei qualche domanda da farti e volevo sapere se possiamo liberamente parlarne in italiano qui nel forum.
Avrei qualche domanda da farti e volevo sapere se possiamo liberamente parlarne in italiano qui nel forum.
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times