Package Manager not installing

Cross-platform IDE for the rapid development of applications for the embedded world, available on Windows, Linux, and macOS.
Post Reply
Author
Message
koripa
Posts: 4
Joined: 04 Jul 2022 09:51

Package Manager not installing

#1 Post by koripa » 04 Jul 2022 09:57

Im trying to install 2 click board libraries from Package Manager in Necto 2.0, but after installing both, they dont show up in the library manager nor do #include work.
Im working with a Uni Clicker, MikroC for ARM and MikroProg for STM32.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Package Manager not installing

#2 Post by filip » 05 Jul 2022 13:49

Hi,

Which click board are you talking about ?

Regards,
Filip.

koripa
Posts: 4
Joined: 04 Jul 2022 09:51

Re: Package Manager not installing

#3 Post by koripa » 06 Jul 2022 07:13

Expand 10, i managed to add it modifying the Cmake file

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: Package Manager not installing

#4 Post by frank.malik » 16 Jul 2022 20:49

Hi koripa,

I have the same issue, but I'm new to CMake.

Would you mind to give a short explanation what you did?
And I think it only solved your project build, but the library manager still doesn't show this board, right?

Thanks and kind regards
Frank
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Package Manager not installing

#5 Post by IvanJeremic » 06 Sep 2022 09:08

Hi,

To convert memake project to Cmake, you need to do the following :

1. Create CMakeLists.txt file and put it in the folder where your memake file is (you don't have to delete the memake file) - see the CMakeLists.txt file below for the Balancer 4 click board :

Code: Select all

cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
    project(example_balancer4 LANGUAGES MikroC)
else()
    project(example_balancer4 LANGUAGES C ASM)
endif()

add_executable(example_balancer4
        main.c
)

find_package(MikroC.Core REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroSDK.Log)
add_subdirectory(lib_balancer4)
target_link_libraries(example_balancer4 PUBLIC Click.Balancer4)
2. Open this file and replace each occurrence of the balancer4 string to click board you want to use (for example change the balancer4 to balancer2 for Balancer 2 click board).

3. After you done this, in the same folder make a subfolder (folder name should go something like lib_balancer4 if you are using the balancer 4 click).

4. Create a second CMakeLists.txt file and put it in this folder, it should look like this (again, change the click board name accordingly) :

Code: Select all

cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
    project(lib_balancer4 LANGUAGES MikroC)
else()
    project(lib_balancer4 LANGUAGES C ASM)
endif()

add_library(lib_balancer4 STATIC
        src/balancer4.c
        include/balancer4.h
)
add_library(Click.Balancer4  ALIAS lib_balancer4)

target_include_directories(lib_balancer4 PUBLIC 
        include
)

find_package(MikroC.Core REQUIRED)
target_link_libraries(lib_balancer4 PUBLIC MikroC.Core)
find_package(MikroSDK.Driver REQUIRED)
target_link_libraries(lib_balancer4 PUBLIC MikroSDK.Driver)
5. Inside the lib_balancer4 folder make 2 sub folders, one named include (this is where you will place already existing header file) an one named src (this is where you will place existing source file).

6. When you do all this go to Open Project in NECTO Studio and choose the first CMakeLists.txt file you made.

Regards,

Ivan.

Post Reply

Return to “IDE”