How to use ambd sdk with BW16?

How do I get started using the raw ambd sdk for the BW16 device? I believe it’s an RTL8720DN under the hood, but what steps do I need to take to specifically target that device, and then build my own application (especially targetting a freeRTOS base)?

I can build the example project, but that doesn’t really give me any pointers to altering the example codes to target this device.

Looking over the supplied Makefiles, I can’t see any reference to the 8720, all the references are to the 8721. Is the architecture similar enough that it doesn’t matter??

Dear @mvdw,

Thanks for posting your question here.

First of all, yes, the ambd_sdk on our GitHub (you named it as raw amdb sdk) is applied for all AmebaD series boards (RTL872x). There is no need to specify the target building.

Sorry, I did not get what you mean by “doesn’t really give me any pointers to altering the example codes to target this device”. Since board defines only appear in Arduino SDK under the variant folder, but not for standard sdk. Normally we can just use the Image Tool to upload compiled images from standard SDK into the target AmebaD board.

Thanks for the prompt reply, but I don’t think I explained my problem very well.

I have no issue with uploading a compiled program to the board, the question I have is where to get started to compile/make my own program, based on the examples in the SDK. Even if it’s just to compile the examples in the example folder.

The main problem I have is the levels of indirection in the Make process - there seems to be a large number of nested Makefiles which makes tracing the build process cumbersome.

Hi @mvdw,

I do understand the issue that you are facing currently.

Since the Ameba D series is a duo-core module, therefore the project is separated into project_lp and project_hp (low-power core and high-power core). Therefore, to build a customized project, please modify the main.c file under ambd_sdk\project\realtek_amebaD_va0_example\src\src_hp and execute make all command.
image

For the second question about too many nested Makefiles, I am sorry that currently we have no detailed documentation yet. :smiling_face_with_tear: However, I suggest that you can treat the Makefile in ambd_sdk\project\realtek_amebaD_va0_example\GCC_RELEASE\project_lp and project_hp (make sequence is from lp to hp) as the entry point:
image

Inside this Makefile, there are many commands such as make -C asdk ABC which indicates the actual make command is by -C (changing folder) to /asdk, then looking for ABC command in the /asdk/Makefile again.

By checking the make rules following this instruction, you may have a better understanding of the whole compilation process. We also recommend that maybe you could share your knowledge in understanding the making process with us, or create a separate knowledge-sharing post in our forum to benefit other new users :slight_smile:

Thanks

Thanks Dakamaster - that’s given me a much better understanding of where to start with making my own project.

1 Like

Most welcome