5.5.2. Syscalls FAQ¶
Contents
5.5.2.1. What is the header to include to get the syscalls prototypes?¶
Syscalls are implemented as functions in userspace, in the libstd.
The header is syscalls.h
.
5.5.2.2. When I declare a device, I always get SYS_E_DENIED?¶
- Denying may be the consequence of various causes:
- You are not in the initialization phase
- You don’t have the permission to register this type of device (see EwoK permissions)
- If you use EXTI for one or more GPIO, you must have the corresponding permission
- If you require a forced execution of the main thread for one more more ISR, you must have the corresponding permission
- You have left a field non-configured with a value that means something not permitted in your case (for example EXTI access request for GPIO)
Hint
It is a good idea to memset to 0 a device_t structure before configuring it and requesting a device to the kernel.
5.5.2.3. When I configure a device, I always get SYS_E_INVAL?¶
- Returning invalid may be the consequence of various causes:
- Your
device_t
structure contains some invalid (unset) field(s). When using the Ada kernel, be sure to memset to 0 the structure before using it, the kernel is very strict with the user entries (for obvious security reasons) - You try to map a device that is not in the supported device map
- You try to map a device with an invalid size
- You have set more IRQ or more GPIOs than the maximum supported in the
device_t
structure
- Your
Hint
It is a good idea to memset to 0 a device_t structure before configuring it and requesting a device to the kernel, and highly recommended when using the Ada kernel