stm8 | Wolk STM8 stuff

 by   LonelyWolf C Version: Current License: No License

kandi X-RAY | stm8 Summary

kandi X-RAY | stm8 Summary

stm8 is a C library typically used in Internet of Things (IoT) applications. stm8 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Wolk STM8 stuff
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              stm8 has a low active ecosystem.
              It has 27 star(s) with 17 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of stm8 is current.

            kandi-Quality Quality

              stm8 has no bugs reported.

            kandi-Security Security

              stm8 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              stm8 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              stm8 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stm8
            Get all kandi verified functions for this library.

            stm8 Key Features

            No Key Features are available at this moment for stm8.

            stm8 Examples and Code Snippets

            No Code Snippets are available at this moment for stm8.

            Community Discussions

            QUESTION

            SDCC generates unnecessary division by zero
            Asked 2021-May-06 at 00:31

            I'm using SDCC to compile for a STM8 microcontroller. Compiling the following file results in a seemingly unnecessary div instruction - which is very slow on the STM8.

            ...

            ANSWER

            Answered 2021-May-05 at 13:42

            Looks like that's a bug somewhere in the compiler because if b = c >> 0 is changed to b = c << 0, b = c + 0, b = a[0]... then no such thing happens. The behavior is observed on both optimized and unoptimized code. But if you optimize for size (--opt-code-size) then only the div is there, the clr instruction isn't emitted. You might want to report that to the developers

            Demo on Compiler Explorer

            Source https://stackoverflow.com/questions/67328583

            QUESTION

            STM8: local declared pointer on global variable
            Asked 2020-Oct-27 at 14:18

            on my STM8 Disco Board with Cosmic Compiler I tried follwoing code and expected 'ptr_a' and 'ptr_aLocal' to be the same:

            ...

            ANSWER

            Answered 2020-Oct-27 at 14:12

            Various older versions of misc embedded compilers tended to optimize code somewhat even when optimizations were supposedly disabled. Particularly Cosmic and Codewarrior had such quirks in older versions. Since the local variable isn't used, it is optimized away.

            You can see this for yourself by viewing the generated assembler - any half-decent debugger will support assembly step debugging. If there is no stack push or index register store instruction there, then it was optimized away.

            You can force the variable to get used with volatile int *ptr_aLocal.

            Unrelated to your question, you should use uint8_t as far as possible nad not int, when programming 8 bit microcontrollers.

            Source https://stackoverflow.com/questions/64554859

            QUESTION

            stm8flash .bin file for EEPROM write
            Asked 2020-Apr-09 at 22:17

            I am attempting to write values directly to the eeprom space on a stm8 micro controller. I don't want to write a program that does this that I flash onto the chip. But i want to write directly to it. The command to do this is in unix is such:

            ...

            ANSWER

            Answered 2020-Apr-09 at 22:17

            The easiest thing to do was to first read the file like so:

            Source https://stackoverflow.com/questions/61112947

            QUESTION

            GPIO extra interrupt in STM32
            Asked 2020-Mar-21 at 09:27

            I see in STM32F103 series, the GPIO extra interrupt is set to the EXTI. And GPIOx_0 (x=A,B,C...)is set to EXTI0. Take an example, if I want to use PA0 and PB0 as interrupt input,can I set them to EXTI0 at the same time? I mean in the EXTI0_Handler function I read the value of the input register of PA0 and PB0 to judge which one input a electrical level I want to carry different function by using if...else. I use it in STM8 successfully but there seems a little problem in STM32. Can you help me? Thanks.

            The answer explains the problem clearly. The picture takes an example that why the four bits will be changed if you set different pins. You can see that the four bit affect by each other status if you config other pins. I ignore this problem before.

            ...

            ANSWER

            Answered 2017-Dec-12 at 21:16

            If you look into the STM32F103 Reference Manual p. 209, you will see that there is actually a multiplexer that decides if PA0, PB0, ... or PG0 is connected to the EXTI0 signal:

            STM32F103 ExtI0 schematic

            That means that you cannot connect both PA0 and PB0 to EXTI0. In fact, there are four specific bits in the alternate function input/output register (AFIO) which let you choose which pin is connected to the EXTI0 signal. Here, these bits are located in the control register AFIO_EXTICR1. See the AFIO register map in the same document for further information.

            Now I don't know which setup you are using, but as I recall, I had separate functions for different interrupt request routines (for EXTI0, EXTI1 and so on).

            Source https://stackoverflow.com/questions/47775401

            QUESTION

            c# API or SDK for st-link v2 or SEGGER J-Link flash downloader
            Asked 2020-Jan-17 at 14:35

            I am wondering if anyone have worked with a custom .net C# GUI that are able to do flash download for an STM microcontroller via ST-Link or SEGGER? I know that segger have their SDK, but it is not free. Are there any opensource API that we can use instead?

            Any help will be appreciated, thanks!

            ...

            ANSWER

            Answered 2020-Jan-17 at 14:35

            If you want to program uCs from your C application just use openOCD (free) and send commands to it. Works with almost every popular debug probe.

            Source https://stackoverflow.com/questions/59788575

            QUESTION

            cpputest on STM8 failed due multiple 'main'
            Asked 2019-Aug-03 at 12:23

            I want to use cpputest on STM8 and installed all the required tools for it. I am able to run cpputest on my simplified code. on my main file which belongs to the hardware I have of course the main function. But in the Test environment I have a main function under AllTests.cpp as well. When I compile it i get the error:

            ...

            ANSWER

            Answered 2017-Nov-16 at 11:01

            As suggested in the commends, there was no other way to create a file with the main loop for only the Controller and separate it from the unit tests.

            My structure looks like: main.c: - contains the includes from the firmware (app.h) and the main() with the run_app() app.c: contains all the firmware and is tested with cpputest

            Source https://stackoverflow.com/questions/47181446

            QUESTION

            What does '.dcall' mean in assembly code?
            Asked 2019-Aug-03 at 11:51

            I'm trying to understand a program in assembly code which should be compiled with COSMIC compiler to run on STM8 controller.

            At the beginning of the program, there are a couple of xref and xdef and then comes a .dcall statement or command. Here it is:

            .dcall "2,0,__checksum16"

            I searched the compiler's manual, the controller's programming manual and the internet in general but couldn't find what does this line mean.

            Could someone please explain what does it mean and what are these comma-seperated entries mean?

            ...

            ANSWER

            Answered 2019-Jul-06 at 12:03

            It is an assembler directive marking the entry point, symbol name and stack usage of a function.

            According to this:

            [...] the first integer is the stack space used by the call instruction plus any automatic storage used by the function. The second integer is the number of bytes stacked by the caller.

            I suggest that given its name and function that it causes debug information to be inserted into the object file for use by the ZAP symbolic debugger. I am not familiar with the Cosmic tool chain, but it is also possibly used to perform stack depth analysis within the call graph by the linker.

            Source https://stackoverflow.com/questions/56907031

            QUESTION

            Reading value from memory location (with 24-bit address) in 8-bit microcontroller
            Asked 2019-Jul-16 at 09:50

            I thought it should be as simple as:

            ...

            ANSWER

            Answered 2019-Jul-16 at 09:23

            From the Cosmic compiler datasheet https://www.cosmic-software.com/pdf/cxstm8_pd.pdf

            cxstm8 provides 2 different memory models depending on the size of the application.

            For applications smaller that 64k, the “section 0” memory model provides the best code density by defaulting function calls and pointers to 2 bytes.

            For applications bigger than 64k, the standard memory model provides the best flexibility for using easily the linear addressing space. Each model comes with its own set of libraries.

            This may be the cause for your problem. If you want to access the memory location of above 16 bit address directly you need to use the correct memory model.

            Source https://stackoverflow.com/questions/57053029

            QUESTION

            Programing STM32 like STM8(register level GPIO )
            Asked 2019-Feb-21 at 05:14

            I programmed STM8 GPIO like PD_ODR_ODR4 = 1; but stm32f10x.h doesn't have this function.Is there any .h file that has definition for bits.

            Sorry but I don't know how to explain this problem better.

            I tried multiple GPIO libraries.

            strong text

            ...

            ANSWER

            Answered 2019-Feb-18 at 10:58

            You mention stm32f10x.h in the question, so I'm assuming it's about the STM32F1 series of controllers. Other series have some differences, but the general procedure is the same.

            GPIO pins are arranged in banks of 16 called ports, each having it's own set of control registers, named GPIOA, GPIOB, etc. They are defined as pointers to GPIO_TypeDef structures. There are 3 control registers that affect pin outputs.

            Writing ODR sets all 16 pins at once, e.g. GPIOB->ODR = 0xF00F sets pins B0 through B3 and B12 through B15 to 1, and B4 through B11 to 0, regardless of their previous state. One can write GPIOD->ODR |= (1<<4) to set pin GPIOD4 to 1, or GPIOD->ODR &= ~(1<<4) to reset it.

            Writing BSRR treats the value written as two bitmasks. The low halfword is the set mask, bits with value 1 set the corresponding bit in ODR to 1. The high halfword is the reset mask, bits with value 1 set the corresponding bit in ODR to 0. GPIOC->BSRR = 0x000701E0 would set pins C5 though C8 to 1, reset C0 through C2 to 0, and leave all other port bits alone. Trying to both set and reset the same bit when writing BSRR, then it will be set to 1.

            Writing BRR is the same as writing the reset bitmask in BSRR, i.e. GPIOx->BRR = x is equivalent to GPIOx->BSRR = (x << 16).

            Now it's possible to write some macros like

            Source https://stackoverflow.com/questions/54735239

            QUESTION

            Adjust Makefile to only recompile files if they have changed
            Asked 2019-Jan-19 at 22:15

            I have a question regarding my Makefile. The Makefile intends to compile C files containing code for a STM8 µC using the Cosmic compiler. The problem is that everytime I invoke the build target, all available source file are getting recompiled without any change. I'm really new in the field of Makefiles and I have no idea how to fix it.

            The second questions is related to the two targets "%.o: src/%.c" and %.o: src/stm8/%.c. They do exactly the same and I would prefer a generic one that is able to deal with all subdirectories within the src folder. With this solution it ist required to add an additional rule for each subfolder of the src folder

            ...

            ANSWER

            Answered 2019-Jan-19 at 20:52

            The build target never gets created, so the commands after it are executed every time you run make (or make all or make build), so the program is linked each time.

            Change your build target so that it is phony:

            Source https://stackoverflow.com/questions/54270001

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install stm8

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/LonelyWolf/stm8.git

          • CLI

            gh repo clone LonelyWolf/stm8

          • sshUrl

            git@github.com:LonelyWolf/stm8.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link