support task self delete for STM8, add a sample of shell for STM8

1. sample project, see TencentOS-tiny\board\STM8L052R8T6\IAR\shell
2. ATTENTION: read TencentOS-tiny\board\STM8L052R8T6\IAR\shell\README.md first
This commit is contained in:
daishengdong
2020-02-15 23:22:38 +08:00
parent 7a0966a2cc
commit 3ddeb9c5cd
34 changed files with 7181 additions and 191 deletions

View File

@@ -210,6 +210,9 @@ __KNL__ k_stack_t *cpu_task_stk_init(void *entry,
}
#endif
*--sp = (cpu_data_t)((uint16_t)exit & 0xFF); /* LRL */
*--sp = (cpu_data_t)(((uint16_t)exit >> 8) & 0xFF); /* LRH */
*--sp = (cpu_data_t)((uint16_t)entry & 0xFF); /* PCL */
*--sp = (cpu_data_t)(((uint16_t)entry >> 8) & 0xFF); /* PCH */