Giter Site home page Giter Site logo

visorfolks / cyancore Goto Github PK

View Code? Open in Web Editor NEW
71.0 10.0 16.0 1.83 MB

A unified software platform for embedded system projects ...

Home Page: https://visorfolks.co.in

License: Other

Makefile 16.38% C 80.50% Assembly 2.63% C++ 0.40% PHP 0.09%
firmware hypervisor framework supervisor terravisor cyancore software visorfolks sdk applications

cyancore's Introduction

End to end embedded development platform, from developers for developers...

Version (arch:2 | major:4 | minor:2): 1.4.0

GitHub CI

Cyancore is an open source unified software platform for embedded system projects. VisorFolks is motivated to develope a framework which enables a developer/user to write a portable project which can run on any of the target. It is designed to be a goto framework for almost all projects, be it an Embedded applications, IoT, firmware, OS, etc. It provides flexibility, tighter integration of features and abilities by utilizing the hardware and software resources better and boost various KPIs of the final product.

If you'd like to learn and contribute to this project, please follow below links for full documentation and start your endeavor.

Join VisorFolks Community Forum

Connect with us over VisorFolks discord server VisorFolks Discord Server

Help

For more information, please visit Github Wiki.

Supported Platforms

Atmel SiFive STMicro TI Raspberry Pi
ATMega328P FE310-G002 Coming soon Coming soon Coming soon
ATMega2560 QEMU SiFive-E

cyancore's People

Contributors

akashkollipara avatar allenjoshey avatar dybios avatar kashish0212 avatar mayurilokhande avatar poojaingalagi avatar pranjalchanda avatar pranjalchanda08 avatar rahulgoyal-tech avatar sagarladla avatar shubhangi47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyancore's Issues

FR: Add IS_ISR() API to depict an ISR context.

Is your feature request related to a problem? Please describe.
Add IS_ISR() API to depict an ISR context.

Describe the solution you'd like
An unified API to tell about current call context to help kernel being non-blocking if the kernel API is being called from ISR context.

/**
  \brief   Get IPSR Register
  \details Returns the content of the IPSR Register.
  \return               IPSR Register value
 */
__STATIC_FORCEINLINE uint32_t __get_IPSR(void)
{
  uint32_t result;

  __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
  return(result);
}
#if    (__ARM_ARCH_7A__      == 1U)
/* CPSR mode bitmasks */
#define CPSR_MODE_USER            0x10U
#define CPSR_MODE_SYSTEM          0x1FU

#define IS_IRQ_MODE()             ((__get_mode() != CPSR_MODE_USER) && (__get_mode() != CPSR_MODE_SYSTEM))
#else
#define IS_IRQ_MODE()             (__get_IPSR() != 0U)
#endif

#define IS_IRQ()                  IS_IRQ_MODE()

FR: Add Cortex M0+ CPU support

Is your feature request related to a problem? Please describe.
Add ARM Cortex M0+ CPU support on Cyancore

Describe the solution you'd like
Using Raspberry PI Pico, port cpu and platform support on cyancore

Improve status.h

  1. Improvement of status.h with categorized err codes
  2. Use error_init_done and error_init_not_done to wrap existing driver setup and release.

FR: FreeRTOS implementation (Port to cyancore)

Is your feature request related to a problem? Please describe.
Cyancore currently does not have the required support for FreeRTOS

Describe the solution you'd like
FreeRTOS port onto Cyancore Framework

BUG: <AVR> ADC read n samples may introduce large latency in sampling rate.

For collecting samples at almost machine level of sampling; I.e. without introducing additional delay between 2 samples, our current platform intro uses delay by performing a check for data alignment.

Suggested alternate approach...

  • Consider adding port based flag which can be checked and reduce latency
  • Consider taking number of samples as argument for adc_read function...

FR: Update drivers to use malloc

Is your feature request related to a problem? Please describe.
Drivers currently use bss/ro/rw data space for instantiating their port structures. These needs to be moved to heap for optimum use.

Describe the solution you'd like
Use malloc and free to assign and claim space for driver ports.

Build Support on Windows OS

Is your feature request related to a problem? Please describe.
This feature is needed to build the cyancore software framework on Windows OS.

  • As of now only Linux support is available but because of the paths, build fails even with windows supported toolchain.

Describe the solution you'd like

  • N/A

Describe alternatives you've considered

  • Use VSCode (Remote) with WSL enabled
  • Use Ubuntu 20.04 Terminal
  • Add VSCode plugin to support build and debug
  • Bring in new build engine (!Last escort!)

Add RISC-V 32I CPU support

Is your feature request related to a problem? Please describe.
Need RISC-V core to the platform.

Describe the solution you'd like
Using Freedom Board E310, the support for CPU and platform will be ported.

FR: Apps library creation support

Need for this feature: in future, apps will be required to be created on cyancore. For this we need library which can perform calls to each layer independently.

Milestone: Assigning no milestone as of now... Let's keep patching the code base.

FR: Heap memory implementation in CC

Is your feature request related to a problem? Please describe.
For execution of modules that may not be used later, common variables can be part of heap and freed on exit. This saves RO/RW/Bss space.

Describe the solution you'd like
Implement malloc and free.

Fix driver.c

  • Driver setup function needs to perform driver online check
  • [Thought: Do we need to perform dependency check] Perform recursive init of drivers to resolve dependency
  • Add separate linker script for driver constructor table

Minimal Project build fails

Describe the bug
When we try to port minimal project, the build fails giving dependency error on WDT and Console.

To Reproduce
Steps to reproduce the behavior:

  1. cp -a project.template <project_name>
  2. cd <project_name>
  3. clear all flags in config
  4. make <project_name>

Expected behavior
This should be a clean build without any errors. But we face build issues.

ADC: Bugs in hal driver

  • wrong bitfields used in line 78 [Replace ADPS with ADTS]
  • bug in line 148, logic is wrongly used [ADIF is set if conversion is done]

<MegaAVR> Arduino UNO doesn't boot after updating memory org

Describe the bug
Upon debug, it is found that data copy isn't happening properly after the memory organisation was updated. This led to bad data on the ram thereby resulting in boot failure.

To Reproduce
Steps to reproduce the behavior:

  1. Try to boot.

Expected behavior
Boot failure and blank screen if using demo_avr

FR: <MegaAVR> Onchip Temperature sensor support

Is your feature request related to a problem? Please describe.
Onboard temperature sensor readout is needed to monitor system health.

Describe the solution you'd like
Use existing ADC driver for MegaAVR chips and port the support for onboard thermal sensor.

Add file headers and document the existing code base

  /**
   * File Name: < 1 Tab > < name >
   * Description: < 1 Tab > < description >
   * < 2 Tab, align to start of description > < descrption-contd. >
   * Primary Author: < align >< name > [< email >]
   * Date: < use tab to align to start of largest subject >< Original Date of creation >
   */
  
   /**
    * < License > ...
    */
  • Add Licenses to every file and framework.
  • Document code and add function headers
   /**
    * <Function name> - 1 Liner description 
    * <Full Description >
    * <arg0>
    * <arg1>
    * ...
    * <return>
    */

Console MemBuf & UART HAL Bugs

Describe the bug

  1. (Membuf) "\b" causes memory usage bypassing actual job done by "\b".
  2. (UART HAL) redundant line of code & unnecessary load store operations.

<MegaAVR> WatchDog support on ATMega328P

Is your feature request related to a problem? Please describe.
This is FR for watchdog driver. As no port for wdt is added on MegaAVR platform, Raising a requirement for the same.

Fix Assembler macros

Use header file for toolchain agnostic asm macros and
choose the definition file based on the toolchain.

Bug: Sysclk_set_clk return wrong code upon successful execution

Describe the bug
sysclk_set_clk(<clk_type>, <clk_val>) return wrong code upon successful execution

To Reproduce
Steps to reproduce the behavior:
call function 'printf("%u\n", -sysclk_set_clk(pll, 320e6));'

Expected behavior
Successful programming should return 0.

BUG: unsigned int is not enough for passing pointers to machine_call

Describe the bug
Using unsigned int means restricting the size to 2 or 4 bytes max which does not comply with pointers which can acquire up-to 8 bytes of space when using pointers. Hence it is a huge vulnerability for inter-arch switch.

Expected behavior
To be able to pass pointers through the mcalls irrespective of any arch.

Workaround
To introduce a user-defined type which switches between the data-type sizes as required.

Eg:

#if defined(ARCH_ARM_32)
#define __CALL_ARG_TYPE__ unsigned long

#elif defined(ARCH_RISCV_64) || defined(ARCH_ARM_64)
#define __CALL_ARG_TYPE__ unsigned long

#else
#define __CALL_ARG_TYPE__ unsigned int

#endif

typedef __CALL_ARG_TYPE__ call_args;

<AVR> Perform check for reset cause

In the init routine of the cpu perform check for reset cause. This is necessary to select boot flow so that system can take necessary action.


This is still under brainstroming... May take up some time before I come up with definitive solution.

This is a critical enhancement update for the cyancore framwork.

FR: Add linting tool support

Is your feature request related to a problem? Please describe.
There is a need for a tool to perform code check to address most of the compile time boundary cases.

Describe the solution you'd like
Add cppcheck tool to build-engine to auto check all the sources.

FR: Global Timer / sched timer in CC framework

Describe the solution you'd like
Global timer and scheduler timer are required for time stamping and invoking scheduler.
The two timer instance should internally call platform APIs and manage the callbacks.

Add function headers for all the functions

For the sake of better user experience add function headers that provides information about the function.

Sample:

/************************************************************************************************************
 * @brief:    <add a brief about the function>
 * 
 * @param[in]      <input parameter name>    <description of the param>
 * @param[out]     <output parameter name>    <description of the param>
 * 
 * @return         <brief about expected returns or error codes>
 ************************************************************************************************************/

FR: Ability to disable logs and optimize code

Is your feature request related to a problem? Please describe.
When console / memory logger is not being used printf becomes a dead code and increases text size.

Describe the solution you'd like
Set flags internally that disables logs.

Fix LibResource.

  • dp to use module array of size = N peripherals
  • Each module element will point to config struct of peripheral
  • Use sp (software properties) to elaborate information on device drivers
  • Flow should be...
    • device driver -> sp -> ret info -> call HAL driver with ID -> dp -> update HAL reg

Create a syslog system for cyancore

Syslog shall be a global logging system for the complete system that can be divided into multiple critical levels.

The user shall be provided with the placeholder to write and register callbacks for different logging channels.
Hence when the log function is called all the channels can be populated with the data to be logged simultaneously.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.