Hello Everyone,
i am trying to create the new project in keil version but i dont know how to include library files and how to create new program file please help me in detail procedure any suggestions will be helpful for me
Hello Everyone,
i am trying to create the new project in keil version but i dont know how to include library files and how to create new program file please help me in detail procedure any suggestions will be helpful for me
Hi
First of all I would advice you to read this Keil µVision Getting Started Guide. There are chapters on how to include source files. When you have done that I would advice you to download and use one of the zipped version of Nordic's SDK (not the pack installer version), e.g. nRF51_SDK_9.0.0_2e23562.zip.
What I usually do depends on whether I am creating a Bluetooth project or just a simple project demonstrating a peripheral like the ADC or TWI. If I need Bluetooth I will make a copy of the project folder "SDK_folder\examples\ble_peripheral\ble_app_template" and rename it. If I dont need Bluetooth I will copy the folder "SDK_folder\examples\peripheral\template_project". Then there are two ways of including drivers and libraries.
The first way is the hard way, but it gives you absolute control of your project files:
Add the "Include paths" pointing to where your header and .c files are located to your project in the Target options -> C/C++ settings. Then right click on the Application folder in the Project explorer window in Keil. Then click "Add existing files" and locate the files you need to use in your project (Or click add new to create new project files).
The second and easier way that gives you less control is to Manage Run-Time Environment in Keil:
Open "Manage Run-Time Environment" and click "Select Packs" and select the latest driver and library packs.
Now you should be able to select new drivers and libraries like this:
Choose e.g. app_uart if you want UART functionality. You might get some orange and red warnings popping up which means that the driver/library that you are trying to add relies on other drivers/libraries. Click "Resolve" and Keil will automatically try to solve this for you. Sometimes you will need to adjust the options from the "Variant" dropdown list to get rid of the red warnings.
Finally, if you haven't already please have a look at these tutorials:
This link is dead:
nRF51822/nRF51422 getting started and documentation overview
This link is dead:
nRF51822/nRF51422 getting started and documentation overview