Search:

Type: Posts; User: stahta01

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. radioT.name[3] = "B0"; And, this is wrong even...

    radioT.name[3] = "B0";

    And, this is wrong even in C++!

    In C++, this should work.


    radioT.name = "B0";

    Tim S.
  2. You can not assign c-string in C! You need to...

    You can not assign c-string in C!
    You need to use strcpy or strncpy function to copy C-strings.

    I suggest reading the warning you get while compiling!

    Tim S.
  3. else (PIND2 = 0) This line should raise an...

    else (PIND2 = 0)

    This line should raise an warning or maybe an error!

    Tim S.
  4. Replies
    5
    Views
    160

    Link to c-tutorial C Tutorial - Learn C -...

    Link to c-tutorial C Tutorial - Learn C - Cprogramming.com
  5. Replies
    5
    Views
    160

    I just read it as a beginner who is a sap. Tim...

    I just read it as a beginner who is a sap.

    Tim S.
  6. Replies
    175
    Views
    4,382

    If you really want others to help; then you need...

    If you really want others to help; then you need to:

    1. Post which git repo has the current code you are having issues with
    2. Add a README in the repo on how to compile/build the repo.

    Tim S.
  7. Replies
    7
    Views
    226

    srand(time(NULL)); That code needs to be...

    srand(time(NULL));

    That code needs to be called only once!
    So, normally please in main function or init function.

    Tim S.
  8. Replies
    7
    Views
    226

    Lookup strncpy and use it instead of strcpy....

    Lookup strncpy and use it instead of strcpy.
    Decide if you are programming in "C" or C++; then write C or C++.

    Casting malloc is wrong in "C"; but, often needed in C++!
    Stop adding blank lines...
  9. Replies
    175
    Views
    4,382

    c - What does a type followed by _t...

    c - What does a type followed by _t (underscore-t) represent? - Stack Overflow



    Tim S.
  10. Replies
    10
    Views
    379

    Hint: "break" is an C keyword. Tim S.

    Hint: "break" is an C keyword.

    Tim S.
  11. Replies
    4
    Views
    152

    "printf" is an output function; I have no idea if...

    "printf" is an output function; I have no idea if you mean to do output or input.
    If input the "&z" is correct and printf is wrong. If output you need to use "z" instead; and, the printf is...
  12. Replies
    4
    Views
    214

    You should read up on the timer and delay support...

    You should read up on the timer and delay support for your embedded hardware! This is one area that changes a lot from one hardware platform to another.

    Tim S.
  13. Replies
    8
    Views
    304

    OP: Do you know what an Compiler is? If no,...

    OP:

    Do you know what an Compiler is? If no, you need to learn about Compilers.
    Do you have an C Compiler for your embedded system? If no, find one.
    Do you know how to compile an C file for your...
  14. Till Rust has a stable ABI there will be no way...

    Till Rust has a stable ABI there will be no way it can replace C !

    Tim S.
  15. I have tried to update sdbinutils to be based on...

    I have tried to update sdbinutils to be based on binutils version 2.31.1 and for 5 of the about 25 backends that use sdbinutils it no longer seg faults when compiled with
    "-Og -fcaller-saves" I...
  16. From Bitwise operations in C - Wikipedia...

    From Bitwise operations in C - Wikipedia



    Tim S.
  17. The segment faults are in sdar which is in folder...

    The segment faults are in sdar which is in folder sdbinutils of SDCC.
    sdbinutils is a fork of binutils version 2.30 sdar is same as binutils ar.

    I have decided I am going to have to read the...
  18. Please read a thread before replying to them! ...

    Please read a thread before replying to them!

    Tim S.
  19. -Og -ftree-bit-ccp -ftree-pta -fif-conversion2...

    -Og -ftree-bit-ccp -ftree-pta -fif-conversion2 -finline-functions-called-once -fcaller-saves


    The above options avoids the segment fault error; now, I need to find how to avoid the error by...
  20. The winner appears to be. I had hoped for...

    The winner appears to be.



    I had hoped for a result that gave me a hint on where to look in the source code. I still need to confirm the problem still exists after removing this option that I...
  21. Ones of these appear to be hiding the seg fault....

    Ones of these appear to be hiding the seg fault.
    My guess is "-fdelete-null-pointer-checks".
    Building with the last six removed to see if one of them might be the cause.
    Edit: The problem was not...
  22. When you use "asm" in a program you likely should...

    When you use "asm" in a program you likely should mention which of the several hundred (or more) assemblies you are using.
    At least mention the CPU or MCU information!

    Tim S.
  23. Which GCC O2 optimization flags are likely to prevent an Segmentation fault?

    I am building an FLOSS project and getting Segmentation faults during build-time (where it runs an project created exe).

    The project is created using MinGW64 GCC version (Rev3, Built by MSYS2...
  24. Link where I failed to see any problem. Expected...

    Link where I failed to see any problem. Expected expression... error
  25. The function strlen() and likely the .str()...

    The function strlen() and likely the .str() assumes you are dealing with C string this is an /0 terminated char array.
    C string can not have embedded /0 in it!

    Therefore, you can NOT use UTF-16...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4