diff options
| author | bernard <[email protected]> | 2025-08-03 03:57:54 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-08-07 09:32:45 +0800 |
| commit | fbdab95299f0de68079978f73fac33c1de8a81ab (patch) | |
| tree | f077b70dfb9adb00f6c911bf3e78d1ecd46f05ca /tools/hello | |
| parent | 5c568f0280179253d52c41cd23bf7f1ff9925746 (diff) | |
[Feature][Tools] Add support for package.json, refactor BuildPackage function to handle new format.
Diffstat (limited to 'tools/hello')
| -rw-r--r-- | tools/hello/package.json | 45 | ||||
| -rw-r--r-- | tools/hello/src/helper.c | 15 | ||||
| -rw-r--r-- | tools/hello/src/helper.h | 16 |
3 files changed, 59 insertions, 17 deletions
diff --git a/tools/hello/package.json b/tools/hello/package.json index 1e390882b1..6fce0b9b00 100644 --- a/tools/hello/package.json +++ b/tools/hello/package.json @@ -1,20 +1,31 @@ { - "name": "hello", - "version": "1.0.0", - "description": "Hello World component for RT-Thread", - "author": "RT-Thread Development Team", - "license": "Apache-2.0", - "type": "rt-package", - "source_files": [ - "hello.c" - ], - "CPPPATH": [ + "name": "hello", + "description": "Hello World component for RT-Thread", + "type": "rt-thread-component", + "dependencies": [], + "defines": [ + "DEFINE_HELLO" + ], + "sources": [ + { + "dependencies": [], + "includes": [ "." - ], - "CPPDEFINES": [ - "HELLO" - ], - "depends": [ - "" - ] + ], + "files": [ + "hello.c" + ] + }, + { + "dependencies": [ + "HELLO_USING_HELPER" + ], + "includes": [ + "src" + ], + "files": [ + "src/helper.c" + ] + } + ] }
\ No newline at end of file diff --git a/tools/hello/src/helper.c b/tools/hello/src/helper.c new file mode 100644 index 0000000000..4367d076a2 --- /dev/null +++ b/tools/hello/src/helper.c @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2025 RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2025-08-03 Bernard First version + */ + +#include "helper.h" + +void hello_helper() +{ +} diff --git a/tools/hello/src/helper.h b/tools/hello/src/helper.h new file mode 100644 index 0000000000..bf8934217d --- /dev/null +++ b/tools/hello/src/helper.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2025-08-03 Bernard First version + */ + +#ifndef __HELPER__H__ +#define __HELPER__H__ + +void hello_helper(); + +#endif //!__HELPER__H__ |
