@@ -133,9 +133,11 @@ void main(void)
133133 uint8_t boot_state , update_state ;
134134
135135 hal_init ();
136- systick_init ();
137136 leds_init ();
137+ #ifndef TZEN
138+ systick_init ();
138139 __enable_irq ();
140+ #endif
139141
140142 wolfBoot_printf ("\n==================================\n" );
141143 wolfBoot_printf ("LPC55S69 wolfBoot demo Application\n" );
@@ -205,63 +207,69 @@ void main(void)
205207}
206208
207209
208- // #include "sys/stat.h"
209- // int _getpid(void)
210- // {
211- // return 1;
212- // }
213-
214- // int _kill(int pid, int sig)
215- // {
216- // (void)pid;
217- // (void)sig;
218- // return -1;
219- // }
220-
221- // void _exit(int status)
222- // {
223- // _kill(status, -1);
224- // while (1) {}
225- // }
226-
227- // int _read(int file, char *ptr, int len)
228- // {
229- // (void)file;
230- // (void)ptr;
231- // (void)len;
232- // return -1;
233- // }
234-
235- // int _write(int file, char *ptr, int len)
236- // {
237- // (void)file;
238- // (void)ptr;
239- // return len;
240- // }
241-
242- // int _close(int file)
243- // {
244- // (void)file;
245- // return -1;
246- // }
247-
248- // int _isatty(int file)
249- // {
250- // (void)file;
251- // return 1;
252- // }
253-
254- // int _lseek(int file, int ptr, int dir)
255- // {
256- // (void)file;
257- // (void)ptr;
258- // (void)dir;
259- // return 0;
260- // }
261-
262- // int _fstat(int file, struct stat *st)
263- // {
264- // (void)file;
265- // st->st_mode = S_IFCHR;
266- // return 0;
267- // }
210+ #include "sys/stat.h"
211+ int WEAKFUNCTION _getpid (void )
212+ {
213+ return 1 ;
214+ }
215+
216+ int WEAKFUNCTION _kill (int pid , int sig )
217+ {
218+ (void )pid ;
219+ (void )sig ;
220+ return -1 ;
221+ }
222+
223+ void WEAKFUNCTION _exit (int status )
224+ {
225+ _kill (status , -1 );
226+ while (1 ) {}
227+ }
228+
229+ int WEAKFUNCTION _read (int file , char * ptr , int len )
230+ {
231+ (void )file ;
232+ (void )ptr ;
233+ (void )len ;
234+ return -1 ;
235+ }
236+
237+ int WEAKFUNCTION _write (int file , char * ptr , int len )
238+ {
239+ (void )file ;
240+ (void )ptr ;
241+ return len ;
242+ }
243+
244+ int WEAKFUNCTION _close (int file )
245+ {
246+ (void )file ;
247+ return -1 ;
248+ }
249+
250+ int WEAKFUNCTION _isatty (int file )
251+ {
252+ (void )file ;
253+ return 1 ;
254+ }
255+
256+ int WEAKFUNCTION _lseek (int file , int ptr , int dir )
257+ {
258+ (void )file ;
259+ (void )ptr ;
260+ (void )dir ;
261+ return 0 ;
262+ }
263+
264+ int WEAKFUNCTION _fstat (int file , struct stat * st )
265+ {
266+ (void )file ;
267+ st -> st_mode = S_IFCHR ;
268+ return 0 ;
269+ }
270+
271+ void WEAKFUNCTION * _sbrk (int incr )
272+ {
273+ (void )incr ;
274+ return 0 ;
275+ }
0 commit comments