Skip to content

Commit f01089e

Browse files
author
JeromeGalan
authored
Merge pull request #348 from Luos-io/rc_2.7.0
Luos Engine release 2.7.0
2 parents 52c827c + 827a101 commit f01089e

File tree

228 files changed

+2546
-258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+2546
-258
lines changed

.clang-format-ignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222

2323
# Third party libs
2424
./tool_services/gate/TinyJSON/tiny-json.h
25-
./tool_services/gate/TinyJSON/tiny-json.c
25+
./tool_services/gate/TinyJSON/tiny-json.c
26+
./tool_services/pipe/WS/native/mongoose

.github/workflows/build.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ jobs:
8080
examples/projects/NUCLEO-F072RB,
8181
examples/projects/NUCLEO-L073RZ,
8282
examples/projects/STM32L4S5_discovery,
83-
examples/projects/ESP32
83+
examples/projects/ESP32,
84+
examples/projects/native
8485
]
8586
os: [macos-latest, windows-latest, ubuntu-latest]
8687

@@ -130,4 +131,4 @@ jobs:
130131
needs: examples-build
131132
runs-on: ubuntu-latest
132133
steps:
133-
- run: echo "Build succeed!"
134+
- run: echo "Build succeed!"

.gitignore

+16-15
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@
1616
**/.gitignore
1717
*.out
1818
*.log
19-
/Examples/Projects/NUCLEO-G431KB/Button/.mxproject
20-
/Examples/Projects/NUCLEO-G431KB/Button/Button.gpdsc
21-
/Examples/Projects/NUCLEO-L432KC/Button/Button.gpdsc
22-
/Examples/Projects/NUCLEO-L432KC/Button/.mxproject
23-
/Examples/Projects/NUCLEO-L432KC/Gate/.mxproject
24-
/Examples/Projects/NUCLEO-L432KC/Gate/Gate.gpdsc
25-
/Examples/Projects/NUCLEO-L432KC/Led/Led.gpdsc
26-
/Examples/Projects/NUCLEO-L432KC/Led/.mxproject
27-
/Examples/Projects/STM32F4-discovery/Button/.mxproject
28-
/Examples/Projects/STM32F4-discovery/Button/Button.gpdsc
29-
/Examples/Projects/STM32F4-discovery/Gate/.mxproject
30-
/Examples/Projects/STM32F4-discovery/Gate/Gate.gpdsc
31-
/Examples/Projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/
32-
/Examples/Projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/.generated_files/
33-
/Examples/Projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/
19+
/examples/projects/NUCLEO-G431KB/button/.mxproject
20+
/examples/projects/NUCLEO-G431KB/button/Button.gpdsc
21+
/examples/projects/NUCLEO-L432KC/button/Button.gpdsc
22+
/examples/projects/NUCLEO-L432KC/button/.mxproject
23+
/examples/projects/NUCLEO-L432KC/gate/.mxproject
24+
/examples/projects/NUCLEO-L432KC/gate/Gate.gpdsc
25+
/examples/projects/NUCLEO-L432KC/led/Led.gpdsc
26+
/examples/projects/NUCLEO-L432KC/led/.mxproject
27+
/examples/projects/STM32F4-discovery/Button/.mxproject
28+
/examples/projects/STM32F4-discovery/Button/Button.gpdsc
29+
/examples/projects/STM32F4-discovery/gate/.mxproject
30+
/examples/projects/STM32F4-discovery/gate/Gate.gpdsc
31+
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/build/
32+
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/.generated_files/
33+
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/dist/
34+
/tool_services/pipe/WS/native/mongoose

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![](https://img.shields.io/discord/902486791658041364?label=Discord&logo=discord&style=social)](http://bit.ly/JoinLuosDiscord)
1010
[![](https://img.shields.io/reddit/subreddit-subscribers/Luos?style=social)](https://www.reddit.com/r/Luos)
1111

12-
Version: 2.6.4
12+
Version: 2.7.0
1313

1414
# Luos Technology
1515
## The most for the developer​

engine/HAL/NATIVE/luos_hal.c

+227
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
/******************************************************************************
2+
* @file luosHAL
3+
* @brief Luos Hardware Abstration Layer. Describe Low layer fonction
4+
* @Family x86/Linux/Mac
5+
* @author Luos
6+
* @version 0.0.0
7+
******************************************************************************/
8+
#include "luos_hal.h"
9+
10+
#include <stdio.h>
11+
#include <time.h>
12+
#include <stdbool.h>
13+
#include <string.h>
14+
15+
/*******************************************************************************
16+
* Function
17+
******************************************************************************/
18+
static void LuosHAL_SystickInit(void);
19+
static void LuosHAL_FlashInit(void);
20+
static void LuosHAL_FlashEraseLuosMemoryInfo(void);
21+
22+
/////////////////////////Luos Library Needed function///////////////////////////
23+
24+
/******************************************************************************
25+
* @brief Luos HAL general initialisation
26+
* @param None
27+
* @return None
28+
******************************************************************************/
29+
void LuosHAL_Init(void)
30+
{
31+
{
32+
// Systick Initialization
33+
LuosHAL_SystickInit();
34+
35+
// Flash Initialization
36+
LuosHAL_FlashInit();
37+
38+
// start timestamp
39+
LuosHAL_StartTimestamp();
40+
}
41+
}
42+
43+
/******************************************************************************
44+
* @brief Luos HAL general disable IRQ
45+
* @param None
46+
* @return None
47+
******************************************************************************/
48+
void LuosHAL_SetIrqState(uint8_t Enable)
49+
{
50+
}
51+
52+
/******************************************************************************
53+
* @brief Luos HAL general systick tick at 1ms initialize
54+
* @param None
55+
* @return tick Counter
56+
******************************************************************************/
57+
static void LuosHAL_SystickInit(void)
58+
{
59+
}
60+
61+
/******************************************************************************
62+
* @brief Luos HAL general systick tick at 1ms
63+
* @param None
64+
* @return tick Counter
65+
******************************************************************************/
66+
uint32_t LuosHAL_GetSystick(void)
67+
{
68+
clock_t tick = clock();
69+
return tick; // return tick
70+
}
71+
72+
/******************************************************************************
73+
* @brief Luos GetTimestamp
74+
* @param None
75+
* @return uint64_t
76+
******************************************************************************/
77+
uint64_t LuosHAL_GetTimestamp(void)
78+
{
79+
return (LuosHAL_GetSystick() * 1000);
80+
}
81+
82+
/******************************************************************************
83+
* @brief Luos start Timestamp
84+
* @param None
85+
* @return None
86+
******************************************************************************/
87+
void LuosHAL_StartTimestamp(void)
88+
{
89+
}
90+
91+
/******************************************************************************
92+
* @brief Luos stop Timestamp
93+
* @param None
94+
* @return None
95+
******************************************************************************/
96+
void LuosHAL_StopTimestamp(void)
97+
{
98+
}
99+
100+
/******************************************************************************
101+
* @brief Flash Initialisation
102+
* @param None
103+
* @return None
104+
******************************************************************************/
105+
static void LuosHAL_FlashInit(void)
106+
{
107+
for (uint16_t i = 0; i < FLASH_PAGE_NUMBER; i++)
108+
{
109+
for (uint16_t j = 0; j < FLASH_PAGE_SIZE; j++)
110+
{
111+
stub_flash_x86[i][j] = 0;
112+
}
113+
}
114+
}
115+
116+
/******************************************************************************
117+
* @brief Erase flash page where Luos keep permanente information
118+
* @param None
119+
* @return None
120+
******************************************************************************/
121+
static void LuosHAL_FlashEraseLuosMemoryInfo(void)
122+
{
123+
}
124+
125+
/******************************************************************************
126+
* @brief Write flash page where Luos keep permanente information
127+
* @param Address page / size to write / pointer to data to write
128+
* @return
129+
******************************************************************************/
130+
void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data)
131+
{
132+
}
133+
134+
/******************************************************************************
135+
* @brief read information from page where Luos keep permanente information
136+
* @param Address info / size to read / pointer callback data to read
137+
* @return
138+
******************************************************************************/
139+
void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data)
140+
{
141+
memset(data, 0xFF, size);
142+
}
143+
144+
/******************************************************************************
145+
* @brief Set boot mode in shared flash memory
146+
* @param
147+
* @return
148+
******************************************************************************/
149+
void LuosHAL_SetMode(uint8_t mode)
150+
{
151+
}
152+
153+
/******************************************************************************
154+
* @brief Save node ID in shared flash memory
155+
* @param Address, node_id
156+
* @return
157+
******************************************************************************/
158+
void LuosHAL_SaveNodeID(uint16_t node_id)
159+
{
160+
}
161+
162+
/******************************************************************************
163+
* @brief software reboot the microprocessor
164+
* @param
165+
* @return
166+
******************************************************************************/
167+
void LuosHAL_Reboot(void)
168+
{
169+
}
170+
171+
#ifdef BOOTLOADER_CONFIG
172+
/******************************************************************************
173+
* @brief DeInit Bootloader peripherals
174+
* @param
175+
* @return
176+
******************************************************************************/
177+
void LuosHAL_DeInit(void)
178+
{
179+
}
180+
181+
/******************************************************************************
182+
* @brief DeInit Bootloader peripherals
183+
* @param
184+
* @return
185+
******************************************************************************/
186+
typedef void (*pFunction)(void); /*!< Function pointer definition */
187+
188+
void LuosHAL_JumpToApp(uint32_t app_addr)
189+
{
190+
}
191+
192+
/******************************************************************************
193+
* @brief Return bootloader mode saved in flash
194+
* @param
195+
* @return
196+
******************************************************************************/
197+
uint8_t LuosHAL_GetMode(void)
198+
{
199+
}
200+
201+
/******************************************************************************
202+
* @brief Get node id saved in flash memory
203+
* @param Address
204+
* @return node_id
205+
******************************************************************************/
206+
uint16_t LuosHAL_GetNodeID(void)
207+
{
208+
}
209+
210+
/******************************************************************************
211+
* @brief erase sectors in flash memory
212+
* @param Address, size
213+
* @return
214+
******************************************************************************/
215+
void LuosHAL_EraseMemory(uint32_t address, uint16_t size)
216+
{
217+
}
218+
219+
/******************************************************************************
220+
* @brief Save binary data in shared flash memory
221+
* @param Address, size, data[]
222+
* @return
223+
******************************************************************************/
224+
void LuosHAL_ProgramFlash(uint32_t address, uint16_t size, uint8_t *data)
225+
{
226+
}
227+
#endif

engine/HAL/NATIVE/luos_hal.h

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/******************************************************************************
2+
* @file luosHAL
3+
* @brief Luos Hardware Abstration Layer. Describe Low layer fonction
4+
* @Family x86/Linux/Mac
5+
* @author Luos
6+
* @version 0.0.0
7+
******************************************************************************/
8+
#ifndef _LUOSHAL_H_
9+
#define _LUOSHAL_H_
10+
11+
#include <stdint.h>
12+
#include <luos_hal_config.h>
13+
14+
/*******************************************************************************
15+
* Definitions
16+
******************************************************************************/
17+
#ifndef _CRITICAL
18+
#define _CRITICAL
19+
#endif
20+
21+
#define LUOS_UUID ((uint32_t *)0x00000001)
22+
23+
#define ADDRESS_ALIASES_FLASH ADDRESS_LAST_PAGE_FLASH
24+
#define ADDRESS_BOOT_FLAG_FLASH (ADDRESS_LAST_PAGE_FLASH + PAGE_SIZE) - 4
25+
26+
/*******************************************************************************
27+
* Variables
28+
******************************************************************************/
29+
30+
/*******************************************************************************
31+
* Function
32+
******************************************************************************/
33+
void LuosHAL_Init(void);
34+
void LuosHAL_SetIrqState(uint8_t Enable);
35+
uint32_t LuosHAL_GetSystick(void);
36+
void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data);
37+
void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data);
38+
39+
// bootloader functions
40+
void LuosHAL_SetMode(uint8_t mode);
41+
void LuosHAL_Reboot(void);
42+
void LuosHAL_SaveNodeID(uint16_t);
43+
44+
#ifdef BOOTLOADER_CONFIG
45+
void LuosHAL_DeInit(void);
46+
void LuosHAL_JumpToApp(uint32_t);
47+
uint8_t LuosHAL_GetMode(void);
48+
uint16_t LuosHAL_GetNodeID(void);
49+
void LuosHAL_EraseMemory(uint32_t, uint16_t);
50+
void LuosHAL_ProgramFlash(uint32_t, uint16_t, uint8_t *);
51+
#endif
52+
53+
// timestamp functions
54+
uint64_t LuosHAL_GetTimestamp(void);
55+
void LuosHAL_StartTimestamp(void);
56+
void LuosHAL_StopTimestamp(void);
57+
58+
#endif /* _LUOSHAL_H_ */

0 commit comments

Comments
 (0)